Solved

Configuring Nagios to send e-mail through external Postfix server

Posted on 2010-11-30
10
1,639 Views
Last Modified: 2013-11-10
Is there a set of instructions or a basic 'how-to' for configuring Nagios to send notification e-mails through a external e-mail server that uses Postfix/Dovecot? Our Postfix environment is configured for SSL/TLS encryption, thus we require all external accounts to login before sending e-mail, thus the environment is not just a simple relay.

OS Platform: RHEL 5.5
Nagios Version: 3.2.3
0
Comment
Question by:Michael Worsham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 34239903
set the relay host inside /etc/postfix/main.cf to the hostname of your mail server in your platform:
relayhost = hostname.$mydomain
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 34239918
Oh sorry my bad i should have read the complete question.
0
 
LVL 18

Expert Comment

by:Sanga Collins
ID: 34243215
i believe you would need to setup sendmail or postfix on the nagios server and configure it for authentication based relay.
0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
LVL 18

Expert Comment

by:Sanga Collins
ID: 34243240
here is the guide i use for postfix smtp authentication relay. It cover TLS which you will need since your main server uses SSL/TLS authentication
0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 34243342
@sangamc Due to DISA/STIG requirements, installation of Postfix/sendmail on the originating (monitoring) server isn't allowed. It must use an external e-mail server already configured for SSL/TLS and part of the AD/LDAP and DNS infrastructure.
0
 
LVL 18

Expert Comment

by:Sanga Collins
ID: 34243426
You will need some way to get the email from the nagios server to the external email server. According to nagios documentation you must install some form of mail utility to accomplish this. There is one other way i can think of however. Since the nagios mail command just runs a printf and the sends that result to postfix, you can modify ti to printf to a file in a predetermined directory, and have the external mail server run a script on a 5 minute schedule for example to connect to the nagios server and pull any notifications that may have been saved in that directory and then send them.
0
 
LVL 18

Expert Comment

by:Sanga Collins
ID: 34243491
i am not familiar with the details of DISA/STIG requirements, but wouldnt a workstation configured with outlook connecting to the external server be the exact same thing. all nagios does in a relay scenario is act like a workstation sending outgoing mail. without the external server it will not be sending mail.
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 34243525
@sangamc - suggestion make sense but #mwecomputers its worth getting approval to install either postfix r sendmail agents on nagios server secure it tight just to allow the relay traffic to the mail server, this can give u the accuracy on the time of alerts and could save you lot of time.
@sangamc - In your previous post I think you forgot to share the guid to use postfix smtp auth relay procedure.
0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 34264019
Well I consulted the powers that be. They would allow postfix or sendmail to be installed, just not actively running (listening) on the monitoring server. They stated that ALL messages from ANY monitoring server that could send e-mail to both internal and external domains be passed through the only allowable 'message/relay' server, which is already configured and running SSL/TLS encryption and registered with a DNS A, MX and PTR record.

0
 
LVL 18

Accepted Solution

by:
Sanga Collins earned 500 total points
ID: 34264040
That should get you going. Sendmail can be called only when nagios needs to send an alert. Configuring it to use the relay only will also allow you to keep an eye on any emails coming from the monitoring server
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question