Messaging
cancel
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 "mail.mycompany.com". It requires a login and password, how do I set this up?

Any help would be greatly appreciated!

Thanks Tim
1 REPLY
Michael Steele_2
Honored Contributor

Re: Sendmail relaying to outside mail server.

http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html

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 "smtp.isp.com", "uname", and "pwd". Append the line
Code:
smtp.isp.com uname:pwdto the file /etc/postfix/sasl_passwd.

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

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

Code:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =4. Reload postfix with
Code:
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


Code:
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