Page 2 of 3

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

Posted: Tue Dec 17, 2013 5:01 pm
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

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

Posted: Thu Jan 02, 2014 4:24 pm
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

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

Posted: Thu Jan 02, 2014 9:25 pm
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

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

Posted: Fri Jan 03, 2014 10:38 am
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?

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

Posted: Fri Jan 03, 2014 2:49 pm
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

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

Posted: Mon Jan 06, 2014 11:47 am
by slansing
Was this resolved? Just saw your PM.

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

Posted: Wed Jan 08, 2014 7:47 pm
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

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

Posted: Thu Jan 09, 2014 11:17 am
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.

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

Posted: Thu Jan 09, 2014 1:34 pm
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

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

Posted: Thu Jan 09, 2014 3:22 pm
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.