[support] Mail relay

Pat Collins pat at linuxcolumbus.com
Thu Mar 27 03:05:56 UTC 2008


On Wed, 26 Mar 2008 21:34:25 -0500, "Tony Yarusso" <tonyyarusso at gmail.com>
wrote :

> 
> The guy who maintains our network with me is concerned about having open
> mail ports in the firewall for web (http) servers.  Therefore, we would
> rather have one dedicated mail server machine that would handle everything,
> rather than letting things like Drupal mail out via PHP.  How would I go
> about setting up Drupal to delegate / relay this task through another
> server?
> 

Setup a smart host to queue the mail locally and forward it to your mail
server.   This way you can better control the outgoing mail and not overload
your actual mail server.

PHP by default will use your local sendmail binary to send mail with the
mail function, so the only configuration you need to do is (if you are using
postfix) to change /etc/postfix/main.cf and set relayhost to the name of
your mail server.  Restart postfix after this change.

If you are using qmail you would edit (or add if it doesn't exist)
/var/qmail/control/smtproutes and add a line like :ip-of-your-mail-server .
You might also set your /var/qmail/control/concurrencyremote to a small
number to better control the number of connections from the web to the mail
server.  


Pat


More information about the support mailing list