LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 11-22-2005, 05:54 PM   #1
alexmkt
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Rep: Reputation: 0
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:
root: me@me.com

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 127.0.0.1. 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.
 
Old 11-22-2005, 05:58 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
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.
 
Old 11-23-2005, 12:24 PM   #3
alexmkt
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 11-23-2005, 02:27 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Sendmail forward all incoming mail to localhost port 26 (Domino mail) speedgelb Linux - Software 3 09-27-2013 11:18 AM
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 01:10 PM
No More Cron Mail, Cron Error? Xhost Linux - General 3 07-26-2004 05:28 PM
Can I run localhost/file.php with CRON function kondor5 Linux - General 1 03-28-2004 07:44 AM
HELP HELP stop cron from mailing plisken Linux - General 2 03-07-2002 01:22 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration