w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
postfix 2.9.6.1 forward all mail to an external mail address
Finally found the answer. Listing here for posterity. Add the folowing line to the end of your main.cf file vi /etc/postfix/main.cf virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp Create a file which lists the mail address you want all mails to be sent to vi /etc/postfix/virtual-regexp Add the following: /.+@.+/ forwardingmailaddress@gmail.com add it to postmap postmap /etc/postfix/virtual-regexp you will need to add a virtual file. touch /etc/postfix/virtual now add it to postmap postmap /etc/postfix/virtual

Categories : Ubuntu

Postfix sending mail from nonexistent email addresses
The reject_unlisted_sender restriction listed in smtpd_sender_restrictions is listed after permit_mynetworks and permit_sasl_authenticated. Postfix traverses the restriction list in order and terminates when it hits the first permit/reject and hence never reaches reject_unlisted_sender. Since your message wasn't rejected by reject_unauth_destination it must've been accepted because of permit_mynetworks or permit_sasl_authenticated. Additionally, unless the sender address you used had a domain part that was actually "owned" by Postfix (i.e. listed in mydestination, virtual_mailbox_domains, virtual_alias_domains, or relay_domains), it can't be validated and reject_unlisted_sender won't work. See details in the postconf(5) man page. Other observations: The warn_if_reject restriction is pl

Categories : Mysql

Emails not arriving on dovecot/postfix (debian)
Can you please post the output of /var/log/mail.log ? Because as far as i think the mail.log would contain something like "could not connect to /var/run/dovecot/auth-master: permission denied". If this is the case then all you have to do is change the permissions of /var/run/dovecot/auth-master so that vmail user can access it. But there's a catch to it. Whenever dovecot is restarted the permissions are reverted. You will have to give them again or you can write a script that does that for you every time dovecot or system is restarted. If this is not the case then post the log here for more clarification.

Categories : Misc

Linux postfix/dovecot 554 Relay access denied
If you use a postfix version newer then 2.10, then you need to add the smtpd_relay_restrictions option as described here: # With Postfix 2.10 and later, the mail relay policy is # preferably specified under smtpd_relay_restrictions. /etc/postfix/main.cf: smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination # Older configurations combine relay control and spam control under # smtpd_recipient_restrictions. To use this example with Postfix ≥ # 2.10 specify "smtpd_relay_restrictions=". /etc/postfix/main.cf: smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination ...other rules... After that, any sasl authenticated user should be able to send mails through the

Categories : Linux

authenticate against with Active Directory via samba
I recommend you this article http://technet.microsoft.com/en-us/magazine/2008.12.linux.aspx from Microsoft. The configure file seems OK.

Categories : Misc

Using SSL to Authenticate LDAP/Active Directory Login
Here is the picture I get from you question web browser --(1)--> your-domian.com --(2)--> your client's AD server So you have purchased an SSL certificate for your-domain.com, so connection (1) is over SSL and all data is encrypted. However this speaks nothing about the connection to the AD server. Connection (2) may be over SSL, TLS or be plain connection. In other words you need to check what your login.php is doing behind the scenes to authenticate in AD. If the connection it uses is SSL or TLS your data is encrypted on that stage, otherwise it is not. So you are correct only in half. The data between the browser and your domain is encrypted, but the data between your domain and the AD server may or may not be.

Categories : PHP

Using active directory to authenticate users on intranet site
If you are looking only for authentication and nothing else, you may get away with only a few lines of code. First, ensure you have ldap enabled in your php. Here's pure php implementation: (note that when doing it this way you should ensure that you DO HAVE a username and a password from a user - anonymous binding will almost always return true for AD) $link = ldap_connect('domain.com'); // Your domain or domain server if(! $link) { // Could not connect to server - handle error appropriately } ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, 3); // Recommended for AD // Now try to authenticate with credentials provided by user if (! ldap_bind($link, 'username@domain.com', 'SomeSecret')) { // Invalid credentials! Handle error appropriately } // Bind was successful - continue

Categories : PHP

Authenticate via Active Directory using LDAP, Java Play Framework
The issue is the SECURITY_PRINCIPAL value you're trying to use is not a valid value that you can bind on. It's only possible to bind with a username, not the attributes associated with a user. Active directory allows you to bind on either username@domain or the user accounts full Distinguishing Name. The DN value is often something like... cn=username,cn=Users,dc=abc,dc=mycompany,dc=com but the actual value depends on your AD configuration. If you want to find a user by their email address, you'll need to bind using an administrator ID (or some ID that has the ability to search), search for the user with that specific email address, then rebind with their username to authenticate. Also, not that it changes anything, but in the bind name ("mail="+email+""") you have a closing " but no

Categories : Java

Authenticate user against active directory using MVC4 forms with optional input domainusername or just username
You could try to use double authentication solution using both Membership and PrincipalContext public bool ActiveDirectoryAuthentication(string username, string password) { var splittedCredentials = username.Split(new[] { "\" }, StringSplitOptions.None); switch (splittedCredentials.Length) { case 1: { var authenticated = Membership.ValidateUser(username, password); if (authenticated) { FormsAuthentication.SetAuthCookie(username, false); } return authenticated; } case 2: { var principalContext = new PrincipalContext(ContextType.Domain, splittedCreden

Categories : C#

postfix; pipe mail content to script for all mail of specific subdomain
It seems i solved the mystery problem. When i create an alias myself from test@example.com to test@vacation.example.com, the script gets called. mail.log Jul 12 15:20:55 mail postfix/pipe[14843]: 8854BB80B07: to=<test@vacation.example.com>, relay=vacation, delay=0.19, delays=0.07/0/0/0.12, dsn=2.0.0, status=sent (delivered via vacation service) vacation.pl logfile: 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:550 main:: - Script argument SMTP recipient is : 'test@vacation.example.com' and smtp_sender : 'peter@example.org' 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:580 main:: - Converted autoreply mailbox back to normal style - from test@vacation.example.com to test 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:590 main:: - Emai

Categories : Misc

Use gmail to send email: Using System.Web.Mail
Follow this url from http://msdn.microsoft.com/en-us/library/system.web.mail.mailmessage.aspx But still in this they recommend Sytem.Net.Mail.

Categories : C#

Warning: mail(): SMTP server response: 550 This is a submission only port. You must authenticate before sending mail in
php.ini & SMTP= - how do you pass username & password PHP mail() command does not support authentication. Your options: ...

Categories : Email

How to prevent HTML Email from having quoted printable when sending with C# using System.Net.Mail.MaiMessage
From what I understand, you can't get the css to work. I think you have to convert the html so that the style are taken out of the style tag and placed inline to the html tags. There are many tool that do this, if you want to do this dynamically in C# take a look at this: Inlining CSS in C#

Categories : C#

E-mail app/filter that copies E-mail from the body of the letter and auto replies to that e-mail
I would suggest checking out Google Apps Script. You can create a script just like you would create any other Google Document in Drive by adding the Scripts module from the app store (Scripts is free and created by google). You can also use the gmail API to do the same thing. Both are very well documented and provide a surprisingly high level of access to your emails and their content.

Categories : Email

Send mail using php and postfix
PHP runs on the server. onClick executes Javascript on the CLIENT machine. You can NOT directly invoke PHP functions via Javascript code, or vice versa. What you're doing can be accomplished with a simple form: <?php if ($_SERVER["REQUEST_METHOD"] == 'POST') { $to = $_POST['to']; $text = $_POST['text']; mail($to, .....); } ?> <form method="POST" action=""> <input type="text" name="to" /> <input type="text" name="text" /> <input type="submit" /> </form> There is no need to use Javascript at all.

Categories : PHP

How can i allow user to authenticate using email and some other field in devise instead of email and password?
As I answered before, you can override find_first_by_auth_conditions method in User model. See my previous answer please. Is there a solution for Rails Gem Devise to allow a user to have multiple emails?

Categories : Ruby On Rails

Forward email using Amazon SES: 554 Message rejected: Email address is not verified.
Not a lot of options here. Amazon SES is a mail notification service more than a pure SMTP server. Because of this, all of your from emails/domains must be previously verified and all of your mail sessions must be properly authenticated. The only alternative i can figure out is to configure postfix as a proxy instead of a relay, so it replaces the from header with a well known address, verified by SES, and properly authenticates in SES.

Categories : Email

unable to semd 1000 mail from cakephp to centos(postfix/covedot)
I'd say this is probably due to the php script taking too long to execute. One solution is to send the emails using BCC but this isn't always an option if you are trying to track emails. You might try sending using a less memory intensive way. What is your current Configemail.php

Categories : Cakephp

It's possible to read email using ID on Postfix?
Try to grep /var/log/mail.log.1, /var/log/mail.log.2, etc files too. But if the email was not bounced via postfix there are no way to recover it. By default postfix keeps emails in undeliverable state (i.e bounced) within 5 days (parameter maximal_queue_lifetime).

Categories : Email

Retrieve email from Postfix using Java
Did you find the JavaMail FAQ? There's lots of tips there, including tips on how to debug and what additional information we would need to see to help you figure out what's wrong. So far all you've told us is that something's not working. Without more details, we can't offer more than general suggestions.

Categories : Java

EC2 Postfix custom email domain
The problem is solved by using the domain name generic mapping. http://www.postfix.org/ADDRESS_REWRITING_README.html#generic The above link describes how to do it. But it is a temporary solution that replaces the lengthy internal domain (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) by mydomain.com for every OUTGOING email. For local email, the system still uses the lengthy internal domain name (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) The problem is: postfix seems to have bypassed the $mydomain, $myorigin, $myhost variable I set in the /etc/main.cf file. If anyone can solve it, I will greatly appreciate it. Harry

Categories : Amazon

Whitelist certain email addresses in postfix
Show some logs please. I suspect that you are sending emails via /usr/bin/sendmail or postdrop. Both this commands bypass the smtpd and so the smtpd_recipient_restrictions, as they delivery the locally to the postfix, not via network. If the sent email arrived via network (and so via smtpd) then show the config too (postconf -n) as you may have other configs that are changing the final result for those emails.

Categories : Email

One email to forward to multiple email addresses
This can be achieved in PHP Server as you have to go in depth of following things: Email Piping Email Headers MIME Email attachments Mailing List Management

Categories : PHP

how to forward a mail - php
You might need to specify the format of your email in the headers: $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/html; charset=iso-8859-1' . " "; mail('you@yoursite.com','subject of the mail','"' . $email . '"',$headers);

Categories : PHP

How to skip Invalid Email Ids in Postfix and prevent it from throwing error
You can activate/configure postfix ability of *address_verification* (see also http://www.postfix.org/ADDRESS_VERIFICATION_README.html) to block unknown sender.

Categories : Java

sending email from g-mail host to five different email accounts using c#
You're storing the mailMessage as a property of the Form, and the address is getting changed by another thread before it's actually sent. Adding the MessageBox lets one thread finish befiore another one starts. Just change sentMail to create a new MailMessage instead of reusing the existing one and you should be fine: public partial class Form1 : Form { Thread t = null; //MailMessage mailMessage; <-- take out this line void sentEmail(Object array) { Object[] o = array as Object[]; SmtpClient client = new SmtpClient(); client.EnableSsl = true; client.Host = "smtp.gmail.com"; client.Port = 587; client.Credentials = new NetworkCredential(textBox4.Text, textBox5.Text); MailMessage mailMessage = new MailMessage(new

Categories : C#

iPhone Display icon in Mail attachement forward actionsheet
Your question is not clear. Probably you are looking for UIDocumentInteractionController. UIDocumentInteractionController allows your app to integrate with documents of specified format. Check these tutorials : Previewing Documents Sharing Data Import/Export Documents

Categories : Iphone

Is use of std::forward with auto&& the right thing to do
You are misinterpreting the guideline. Or at least taking it too literally. I think there are three important things to realise here. First, all types are known here. The advice for universal references applies mostly for generic code with templates where you don't know at all if something is or takes an lvalue reference or an rvalue reference. Second, the function takes an rvalue reference: you have to pass an rvalue. Period. There is no choice here. And the logical conclusion is that you do not want to pass an universal reference: whatever you pass has to be an rvalue, it can never be an lvalue. Universal references can be lvalues (if they are instantiated as lvalue references). Passing an universal reference along means "I don't know what kind of reference this is, and I can pass it

Categories : C++

spring social get user email while authenticate
In your configuration, you need to specify scope as a property of the FacebookAuthenticationService. This is the service that handles calls to auth/facebook In XML configuration, instead of: <facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}"/> use: <bean id="connectionFactoryLocator" class="org.springframework.social.security.SocialAuthenticationServiceRegistry"> <property name="authenticationServices"> <list> <bean class="org.springframework.social.facebook.security.FacebookAuthenticationService"> <constructor-arg value="${facebook.clientId}" /> <constructor-arg value="${facebook.clientSecret}" /> <property name="scope" value="email" /

Categories : Misc

How to set gecos attribute in Active Directory using directory services(C#)
I finally found the way to access the attribute. Instead of using directly the DirectoryEntry to connect to the LDAP such as : DirectoryEntry DEBase = new DirectoryEntry("LDAP://" + DomaineName); I used DirectoryContext context = new DirectoryContext(DirectoryContextType.Domain, domaineName)); DirectoryEntry dERoot = System.DirectoryServices.ActiveDirectory.Domain.GetDomain(context).GetDirectoryEntry(); Then I have no problem accessing the gecos attribute

Categories : C#

How to authenticate a local xampp server to send email
I figured this out: here is my code: ini_set('SMTP','mail.somewebsite'); ini_set('smtp_port','26'); ini_set('sendmail_from','email@somewebsite'); ini_set('auth_username','email@somewebsite'); ini_set('auth_password','password'); $headers = "From:email@somewebsite " . 'X-Mailer: PHP/' . phpversion() . " " . "MIME-Version: 1.0 " . "Content-Type: text/html; charset=utf-8 " . "Content-Transfer-Encoding: 8bit "; mail("email@gmail.com", "testing authentication", "hello world", $headers);

Categories : Email

How can I authenticate static resources in virtual directory?
Storing authentication state in the session state, of which the Session State is set to SQL Server (instead of inProc). http://msdn.microsoft.com/library/ms178586.aspx Might be useful. This way, Server A can perform the authentication function and store the authentication status into session object (which is stored in the SQL server) and when user access Server B, server B can check the session state to confirm the authentication status before allowing access to the file. You can either do URL Rewrite to point all the "authentication checker" program instead of the static file directly. If the "authentication checker" confirms that authentication is ok, it will then stream the actual static file to the client.

Categories : C#

Rails 3 : How can I make auto grading system nested_form based online test system?
Try like this, you are trying to call your method on an array. your have to iterate over it and then you can assign any value to it. you can do some re-factoring in your code as well to avoid loops. in your grading method, do this: def grading @survey = Survey.new @survey.user_id = current_user.id @survey.questions.each do |question| question.auto_check end redirect_to results_surveys_path(@survey) end In your Question model write a method auto_check like this: def auto_check answers.each do |answer| is_correct = true if answer.user_answer and answer.correct self.save! end end I think it is a better approach.Thanks. Updated Answer: Whenever you try to pass an id in your path, that means that is a member function, if you a

Categories : Ruby On Rails

How to create folder with the name contains forward slash / in documents directory in iOS platform
The OS APIs prevent you from creating files or directories containing a forward slash (/), since that is the path separator for directories in HFS+. Technically HFS+ file names can contain this character, but the OS APIs prevent you from actually creating such files. I recommend figuring out some other naming convention for your directories that doesn't include forward slashes (replace them with another character, for instance), or else just create nested directories.

Categories : Objective C

Deletion of a directory with System.IO.Directory.Delete
Use the overload that accepts a boolean as the second parameter and pass true. That will recursively delete all files and directories in the directory. See http://msdn.microsoft.com/en-us/library/fxeahc5f.aspx Directory.Delete Method (String, Boolean): public static void Delete( string path, bool recursive )

Categories : C#

PHP Mail Not Sending To Email
The syntax is wrong You forgot to put @ correct syntax is <?php @mail("nishil.shah17@gmail.com","PHP Mail Works!","Awesome","Hello"); ?> and one more thing if you are using it on localhost than possible it won't work so you have to check it on remote server

Categories : PHP

how to send email to a particular mail id?
For Sent mail use following code. final Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { vendoremail }); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, _productList.get(0).ProductName); startActivity(Intent.createChooser(emailIntent, "Send mail...")); here.. vendoremail = email id, _productList.get(0).ProductName = Email description EDIT : You have to give permission in AndroidManifest.xml file. <uses-permission android:name="android.permission.INTERNET" />

Categories : Java

How to customize the way an email looks sent from a php mail() script
In the mail function add a parameter headers like this : $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/html; charset=iso-8859-1' . " "; and call the mail function like this : mail($to, $subject, $Body, $headers) If you would like to format your message (the content of variable $Body), you are free to use as much HTML as you want.

Categories : PHP

mail() functions sends 2 same email
Remove marked line: $message = "You have successully registered to Block Builder Fighter! To activate your account click the link below or paste it into the URL bar of your broswer: http://bbf-gima.hostoi.com/user/active.php?code=$code "; /* remove or mark as comment mail($email, $subject, $message, "From: no-reply_BBF"); */ if(!mail($email, $subject, $message, "From: no-reply_BBF")) and try again

Categories : PHP

Laravel 4 mail class, how to know if the email was sent?
If you do if ( ! Mail::send(array('text' => 'view'), $data, $callback) ) { return View::make('errors.sendMail'); } You will know when it was sent or not, but it could be better, because SwiftMailer knows to wich recipients it failed, but Laravel is not exposing the related parameter to help us get that information: /** * Send the given Message like it would be sent in a mail client. * * All recipients (with the exception of Bcc) will be able to see the other * recipients this message was sent to. * * Recipient/sender data will be retrieved from the Message object. * * The return value is the number of recipients who were accepted for * delivery. * * @param Swift_Mime_Message $message * @param array $failedRecipients An array of failures by-reference * *

Categories : Laravel



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.