Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The last time i was setting up nagios was on a quite big event and it worked like it should, but there was a problem with the e-mail notifications for nagios. Nagios was suppose to send out notifications when there were any problems with the servers, but this never happend / worked like it should. (Yes, i have read the nagios doc. and then also created the contact objects, contact groups etc.)
To troubleshoot this problem i first checked the nagios logs which indicated that nagios couldnt find the "mail" program which is used to send out the notification emails. It tried to look for the program in a directory on the system, but it wasnt the correct one. I fixed this problem with making a symlink from the directory the mail program was to the directory where nagios were looked for it. I now checked the logs for nagios again and it didnt say anything now about not finding the mail program and there was nothing that indicated that the emails werent sent..so they should then be sent. ..But even after a while (1 hour) i didnt receive any emails from nagios.
I now checked the mail logs for sendmail because i guess nagios is using this as the default MTA. There was no indication from these logs that the mails werent sent, so they should have been sent. I then looked in the mail queue where i found all the mails, lined up together, waiting to be sent. ..But after a while they just timed out, all of them.
I cant seem to see what the problem is there, nagios is sending mail when there is a problem, but the mail just stays in the mail queue and times out..what is wrong here? ..I have tried to remove all firewall, but there is no change at all. Port 25 is after what i understand the only one needed to be open for these email notifications to work..and it should be open.
I dont have the logs now from this, because this happened a some weeks ago now, but i still have some test config for nagios which have the exact same problem.
I would appericiate any help with this problem as it seems to be q tricky subject. Thanks.
Where is nagios sending email notifications to? Is it to a mail server you manage? Can you manually send email using the mail program from your nagios server to the email address you have specified in nagios? I think the approach you want to take is to first figure out if it's a nagios problem, a sendmail problem or a network problem blocking port 25 (firewall, ISP, etc.).
Thanks for your reply. Nagios is sending email notifications to an email address specified in one of the contect objects. You bring up a pretty good point about trying to see if the mail program actully will send the mail. But, since the email has been sent to the mail queue i guess that there is nothing wrong with this program and that the problem would be more sendmail/network related. I cannot see how this would be a nagios problem, when the mail is being sent from nagios.
You dont have to have a mail server running to be able to send mail with the mail program, at least that would be weird ..and from where i stand, port 25 should be open, so it might be that the ISP is blocking it, is there any way to check this? I know my ISP is blocking port 80 (i dont know this was found out)..but im not sure if they block port 25. If they are blocking port 25, then why would they do this, so noone can send mail?
If you can see you are talking to the mail server port 25 is not blocked and if you can't:
# service iptables stop
and try again. If it's still blocked:
# service iptables start
If it's your iptables firewall causing the problem you'll have to make the appropriate changes to your iptables config and restart the service.
Your ISP is probably blocking port 25 (outbound) except to it's own smtp server(s) as many of them do nowadays in an effort to help thwart spammer attempts to exploit open relay mail servers (e.g. poorly configured ones).
If it is blocked (as is mine with my home ISP) you might want to look in to setting up sendmail to use your ISP's mail server as a mail relay. Note: you may have to setup sendmail to use smtp authentication to connect to your ISP's mail server.
Last edited by scotlarsen; 10-28-2007 at 05:47 PM.