Re: php mail() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul M Foster wrote:
 > 4. All due respect to Kranthi, but I believe he's wrong about relaying
mail from your webserver to the ISP's mailserver. I believe the ISP's
mailserver doesn't care, as long as the mail comes from your "pipe". You
could probably call yourself "pizza@xxxxxxxxxxxxx" and your ISP would
accept it. It's just the From:. Again, I could be wrong.

All the ISPs I have used so far require the user to authenticate even when on the same network. So if you want to relay through the SMTP server of your ISP you need to login first. I think that is what Kranthi said

Try this:
1) Set up a password maps file (/etc/postfix/sasl_passwd) with the content:
	mail.ispserver.com    username:password

Now Execute these commands
# chown root:root /etc/postfix/sasl_passwd
# chmod 600 /etc/postfix/sasl_passwd
# postmap /etc/postfix/sasl_passwd

And change your config to this /etc/postfix/main.cf:
relayhost = mail.ispserver.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

Now reload postfix and try it again.
	# postfix reload

--
John
Question / Answer based CAPTCHA
http://www.network-technologies.org/tiny.php?id=1

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux