-   Linux - Enterprise (
-   -   How do I get cron mail to stop forwarding through localhost on CentOS 4? (

alexmkt 11-22-2005 04:54 PM

How do I get cron mail to stop forwarding through localhost on CentOS 4?
So I have started to upgrade my production environment from Redhat 7.3 to CentOS 4. On redhat 7.3 to get cron mail, and other system stuff, I just put and entry in /etc/aliases like this:

That would simply send all the mail directly to me.

It no longer works this way on CentOS. The default behavior is to forward all mail to the local sendmail server listening on I need to run my own mail servers, so this behavior is not working for me. Does anyone know an easy way to have this mail send directly, as it worked on 7.3? Even forwarding all mail for all users to one address would be sufficient for me.

acid_kewpie 11-22-2005 04:58 PM

well that should fit in with what you're trying to do... in your /etc/crontab you'd set the MAILTO= line to be the desired recipient. that then passes to localhost as you said, but then either sendmail or postfix should then be able to lookup the mx for the recipient and contact the right onward mailserver. if your intranet has MX records accessible through DNS then you're likely to be just fine and it works a treat.

alexmkt 11-23-2005 11:24 AM

I have set the mailto line, but I really can't have that mail server listening on localhost on all of my servers. I assume this is something that can be fixed with procmail, but I can't figure out how.

acid_kewpie 11-23-2005 01:27 PM

i don't understand... why not? it's a very very common standard to have stmp listening on loopback if not external interfaces. abstraction of mail transports is a great thing.

All times are GMT -5. The time now is 01:15 AM.