[Solved] Install won't relay off of my Exchange 2007 server

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Install won't relay off of my Exchange 2007 server

Post by slansing »

Can you grab 30 or so lines from your maillog after you force a notification through nagios and share it with us here? I'm not sure what the exact directory is for freeBSD it may just be:

Code: Select all

/var/log/maillog
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Install won't relay off of my Exchange 2007 server

Post by jbruyet »

Ok, here are the 30 lines. I'm seeing some stat=Sent sections but as far as I can tell my Exchange server isn't getting the messages:

Code: Select all

Jan  2 12:55:00 FreeNag sendmail[24315]: s02Kt0mZ024315: from=root, size=271, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jan  2 12:55:00 FreeNag sm-mta[24320]: alias database /etc/mail/aliases.db out of date
Jan  2 12:55:00 FreeNag sm-mta[24320]: s02Kt0Mn024320: from=<[email protected]>, size=562, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Jan  2 12:55:00 FreeNag sm-mta[24321]: alias database /etc/mail/aliases.db out of date
Jan  2 12:55:00 FreeNag sendmail[24315]: s02Kt0mZ024315: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30271, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s02Kt0Mn024320 Message accepted for delivery)
Jan  2 12:55:00 FreeNag sm-mta[24321]: s02Kt0Mn024320: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30819, relay=local, dsn=2.0.0, stat=Sent
Jan  2 13:00:00 FreeNag sendmail[27272]: s02L002B027272: from=root, size=271, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jan  2 13:00:00 FreeNag sm-mta[27283]: alias database /etc/mail/aliases.db out of date
Jan  2 13:00:00 FreeNag sm-mta[27283]: s02L00tM027283: from=<[email protected]>, size=562, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Jan  2 13:00:00 FreeNag sm-mta[27284]: alias database /etc/mail/aliases.db out of date
Jan  2 13:00:00 FreeNag sendmail[27272]: s02L002B027272: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30271, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s02L00tM027283 Message accepted for delivery)
Jan  2 13:00:00 FreeNag sm-mta[27284]: s02L00tM027283: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30819, relay=local, dsn=2.0.0, stat=Sent
Jan  2 13:05:00 FreeNag sendmail[30211]: s02L50Gs030211: from=root, size=271, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jan  2 13:05:00 FreeNag sm-mta[30212]: alias database /etc/mail/aliases.db out of date
Jan  2 13:05:00 FreeNag sm-mta[30212]: s02L50BJ030212: from=<[email protected]>, size=562, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Jan  2 13:05:00 FreeNag sendmail[30211]: s02L50Gs030211: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30271, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s02L50BJ030212 Message accepted for delivery)
Jan  2 13:05:00 FreeNag sm-mta[30213]: alias database /etc/mail/aliases.db out of date
Jan  2 13:05:00 FreeNag sm-mta[30213]: s02L50BJ030212: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30819, relay=local, dsn=2.0.0, stat=Sent
Jan  2 13:10:00 FreeNag sendmail[33050]: s02LA0Si033050: from=root, size=271, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jan  2 13:10:00 FreeNag sm-mta[33051]: alias database /etc/mail/aliases.db out of date
Jan  2 13:10:00 FreeNag sm-mta[33051]: s02LA0n0033051: from=<[email protected]>, size=562, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Jan  2 13:10:00 FreeNag sm-mta[33052]: alias database /etc/mail/aliases.db out of date
Jan  2 13:10:00 FreeNag sendmail[33050]: s02LA0Si033050: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30271, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s02LA0n0033051 Message accepted for delivery)
Jan  2 13:10:00 FreeNag sm-mta[33052]: s02LA0n0033051: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30819, relay=local, dsn=2.0.0, stat=Sent
Jan  2 13:15:01 FreeNag sendmail[35980]: s02LF1Fl035980: from=root, size=271, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jan  2 13:15:01 FreeNag sm-mta[35981]: alias database /etc/mail/aliases.db out of date
Jan  2 13:15:01 FreeNag sm-mta[35981]: s02LF1aK035981: from=<[email protected]>, size=562, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Jan  2 13:15:01 FreeNag sm-mta[35982]: alias database /etc/mail/aliases.db out of date
Jan  2 13:15:01 FreeNag sendmail[35980]: s02LF1Fl035980: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30271, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s02LF1aK035981 Message accepted for delivery)
Jan  2 13:15:01 FreeNag sm-mta[35982]: s02LF1aK035981: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30819, relay=local, dsn=2.0.0, stat=Sent
Thanks,

Joe B
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Install won't relay off of my Exchange 2007 server

Post by jbruyet »

I realize it probably doesn't make any difference but I redid my aliases.db and now that one error is gone.

Thanks,

Joe B
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Install won't relay off of my Exchange 2007 server

Post by tmcdonald »

jbruyet wrote:I realize it probably doesn't make any difference but I redid my aliases.db and now that one error is gone.

Thanks,

Joe B
Just out of curiosity, what did you change?
Former Nagios employee
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Install won't relay off of my Exchange 2007 server

Post by jbruyet »

Hey tmcdonald, I did a Google search and saw all I had to do was to just run newalises. That took care of the "/etc/mail/aliases.db out of date" error.

Thanks,

Joe B
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Install won't relay off of my Exchange 2007 server

Post by slansing »

Was this resolved? Just saw your PM.
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Install won't relay off of my Exchange 2007 server

Post by jbruyet »

This hasn't been resolved yet. I uploaded the 30 lines of my maillog and I'm waiting to hear back from anyone who can see what the problem is.

Thanks,

Joe B
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Install won't relay off of my Exchange 2007 server

Post by slansing »

Have you checked your exchange/relay itself? It looks like your mail is being sent out just fine, it is just not being received on the other end which is indicative of a problem with the middle layer.
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Install won't relay off of my Exchange 2007 server

Post by jbruyet »

Thank you slansing, the problem is a combination of my Nagios server and my Exchange Server. My Exchange Server doesn't allow relaying off of the Primary IP address so I use a Secondary address configured on the server for internal device relaying. I ran a Wireshark scan (which I should have done earlier) and saw that my Nagios server is sending information to the Primary address. I've checked on Google to see how to change Nagios' mail configuration to Exchange's Secondary address but I can't find anything. I checked my config files and I can't find anything there that's pointing to my Exchange Server so now I'm wondering if I need to change something in FreeBSD's mail setup. I'll Google that and see if I can find something.

Thanks again slansing, it's a relay issue.

Joe B
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Install won't relay off of my Exchange 2007 server

Post by sreinhardt »

Your smtp connection from nagios should be based on DNS. The simplest, although technically improper way to do it, would be to modify /etc/hosts and add a line for the mail server with the IP that you want it to send to. Alternatively the proper route is to create a dns record internally that points the the exchange servers secondary IP and point nagios at that IP. At least that is likely how I would resolve the issue from what I read.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked