User Tools

Site Tools


outgoing_mails_from_postfix_to_relayhost

This is an old revision of the document!


Outgoing mails from postfix to relayhost

In order to let another mail server handle your outgoing mail traffic do following:

Edit /etc/postfix/main.cf add following line

relayhost = <relay server>

Reload postfix configguration:

service postfix reload

If you don't use your server as mail receiver, make sure postfix is only listening on port 25 on 127.0.0.1. In this way, incoming mails will not be handled.

 netstat -anp | grep 25
 tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1745/master         

In RHEL6 listening to 127.0.0.1 is the default configuration.
If this is not the case insert following line in /etc/postfix/main.cf:

inet_interfaces = loopback-only

and reload postfix configuration

outgoing_mails_from_postfix_to_relayhost.1308920661.txt.gz · Last modified: 2011/06/24 13:04 by root