LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2010, 03:00 PM   #1
pshankland
Member
 
Registered: Feb 2006
Location: UK
Distribution: CentOS 5.5
Posts: 46

Rep: Reputation: 15
mail.rc For External SMTP


Hi all,

I am running CentOS 5.5 and am trying to get Nagios to send out Emails.

After a bit of reading I have the following in my /etc/mail.rc file:

Code:
[root@linux ~]# cat /etc/mail.rc
set ask askcc append dot save crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
set smtp=172.29.1.76
You have new mail in /var/spool/mail/root
[root@linux ~]#
I have Nagios setup correctly and introduced an error to generate an Email but nothing has come through.

I suppose I have two questions:

1. Is mail.rc setup correctly?
2. Can I test to see if mail.rc is working correctly?

Thanks.
 
Old 07-01-2010, 06:22 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
The mail program that comes standard with centos doesn't understand "set smtp". But, you can install the nail rpm (from either epel or rpmforge), which does. The one from rpmforge uses /etc/nail.rc for the config file (newer versions use /etc/mail.rc). You'll also need to adjust your nagios config to use /usr/bin/nail instead of /bin/mail. I don't know the specifics of the epel version.
 
1 members found this post helpful.
Old 07-02-2010, 02:15 AM   #3
pshankland
Member
 
Registered: Feb 2006
Location: UK
Distribution: CentOS 5.5
Posts: 46

Original Poster
Rep: Reputation: 15
Brilliant! Thanks for your help Berhanie
 
Old 07-02-2010, 04:44 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You're welcome, pshankland.
 
  


Reply



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
smtp proxy filter to external isp smtp leandronf Linux - Server 2 02-01-2010 04:42 AM
Mail MUA with external SMTP server rahmad Linux - Software 5 07-03-2008 07:18 AM
Unable to send mail to some mail servers due smtp greetings malformed atotomex Linux - Networking 6 12-20-2005 04:38 PM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
SMTP and KMail and SMTP and Netscape Mail jazz... Linux - Newbie 5 10-11-2003 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration