Showing results for 
Search instead for 
Did you mean: 

Sendmail relaying to outside mail server.

Timothy P. Jackson
Valued Contributor

Sendmail relaying to outside mail server.

I am trying to setup sendmail to relay to an outside mail service "". It requires a login and password, how do I set this up?

Any help would be greatly appreciated!

Thanks Tim
Michael Steele_2
Honored Contributor

Re: Sendmail relaying to outside mail server.

Very briefly, here's the method given there (assuming that "sendmail" is a wrapper for postfix):

1. Assume the ISP access URL, username, and password are "", "uname", and "pwd". Append the line
Code: uname:pwdto the file /etc/postfix/sasl_passwd.

2. Create the file /etc/postfix/sasl_passwd.db with the command

postmap hash:/etc/postfix/sasl_passwd3. Insert the lines

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =4. Reload postfix with
postfix reloadThere's one more essential step for getting the mail command to work that does not involve postfix. In your php5.conf file, insert the line

sendmail_path = sendmail -t -i -f myaddr@myisp.netWithout this, the mail relay at your ISP will almost certainly attempt to send an acknowledgment,
which will bounce and cause your mail not to be sent.
Support Fatherhood - Stop Family Law