2003 June 10

Howto configure postfix to use a remote SMTP relay host

This is a public service message, because when I queried google "configure postfix remote smtphost", I couldn't find anything useful to the question I was trying to answer.

So you're running Linux, and your ISP is filtering traffic on port 25, thus blocking you from sending outgoing mail, and so you want to configure your mailserver to relay all your mail out through your ISP's server, like they want you to. If you're running postfix, this turns out to be very easy -- in /etc/postfix/main.cf, just set the variable:

	relayhost = smtp.yourisp.com
then restart postfix (/etc/init.d/postfix restart, as root).

You're welcome.

Comments

:( I followed the instructions but my ISP's smtp server bounces my messages telling me that "relaying mail to foo.wherever is not allowed"

Am I doing something wrong?

Thanks
Steve

Posted by: Steve Wollkind on June 28, 2003 04:08 PM

'smtp.yourisp.com' is a placeholder for whatever outgoing smtp server your ISP wants you to use -- they should have told you somewhere. If they have relaying mail blocked on that server, then I dunno. We're out of my depth, sorry.

Posted by: colin roald on June 28, 2003 05:01 PM

Could u pls. give me instructions on how to configure postfix. It will be helpful for my career.

Thanks in Advance.

Posted by: Hemanth on July 8, 2003 09:50 AM

Thanks. Took me a while to figure out that my ISP had blocked this port, I was scratching my head for a while wondering why my mails were all timing out..

This fixed it though. :)

Posted by: Axelay on July 26, 2003 11:54 PM

Thanks for this info. This solved my problem. Turns out, php requires a smtp on the local system, and I had a program in php that only used the php mail() function, so I had to setup postfix to relay to my ISP's mail server when they blocked port 25.

Posted by: David L. on September 23, 2003 09:23 PM

http://www.redhat.com/support/resources/howto/RH-postfix-HOWTO/c241.html#AEN244

Posted by: GunnieBaby on October 13, 2003 10:40 AM

Actually it wasn't my ISP that was blocking me but rather several mail servers (noteably Netscape/AOL) do not allowed mail in from hosts with IP addresses listed as being dynamic.

So now at least mail can float around on Shaw's mail servers rather then on mine (and in theory get delivered). Thanks for the good info.

Posted by: Archangel on November 11, 2003 11:52 PM
Post a comment
Yes   No   (like the Turing Test, but easier)

TrackBack Links
If you run a blog that supports TrackBack, you can link to this article with this TrackBack key.