Page 1 of 1

sendmail problem

Posted: Thu Jul 03, 2014 9:44 pm
by majed
Hello, i am connecting to the internet through an isp and when it fails i am automatically swithced to another isp. sendmail works fine with the first isp but when the switch over happens the emails stop being sent.
/var/log/mail.log

Code: Select all

Jul  4 05:33:41 oversun sm-mta[28593]: s642WSeK028593: Saved message in /var/lib/sendmail/dead.letter
Jul  4 05:34:35 oversun sendmail[28872]: s642YZcw028872: from=nagios, size=347, class=0, nrcpts=1, msgid=<[email protected]>, relay=nagios@localhost
Jul  4 05:34:35 oversun sm-mta[28874]: s642YZcC028874: from=<[email protected]>, size=633, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:34:45 oversun sendmail[28891]: s642YjN4028891: from=nagios, size=227, class=0, nrcpts=1, msgid=<[email protected]>, relay=nagios@localhost
Jul  4 05:34:45 oversun sm-mta[28892]: s642YjEh028892: from=<[email protected]>, size=513, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:35:02 oversun sendmail[28944]: s642Z2Rg028944: from=root, size=375, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jul  4 05:35:02 oversun sm-mta[28945]: s642Z2gF028945: from=<[email protected]>, size=617, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:35:02 oversun sendmail[28944]: s642Z2Rg028944: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30375, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s642Z2gF028945 Message accepted for delivery)
Jul  4 05:35:13 oversun sm-mta[28874]: s642YZcC028874: to=<[email protected]>, ctladdr=<[email protected]> (1001/1001), delay=00:00:38, xdelay=00:00:38, mailer=relay, pri=30633, relay=mx10.mail.oversun.ru. [188.127.232.6], dsn=2.0.0, stat=Sent (<[email protected]> [InternalId=10160405] Queued mail for delivery)
Jul  4 05:35:13 oversun sm-mta[28892]: s642YjEh028892: to=<[email protected]>, ctladdr=<[email protected]> (1001/1001), delay=00:00:28, xdelay=00:00:28, mailer=relay, pri=30513, relay=mx10.mail.oversun.ru. [188.127.232.6], dsn=2.0.0, stat=Sent (<[email protected]> [InternalId=10160407] Queued mail for delivery)
Jul  4 05:35:14 oversun sendmail[28891]: s642YjN4028891: [email protected], ctladdr=nagios (1001/1001), delay=00:00:28, xdelay=00:00:28, mailer=relay, pri=30227, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s642YjEh028892 Message accepted for delivery)
switched to isp 2

Code: Select all

Jul  4 05:35:24 oversun sm-mta[28947]: s642Z2gF028945: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:22, xdelay=00:00:22, mailer=relay, pri=120617, relay=mx1.mail.oversun.ru. [188.127.232.5], dsn=5.1.1, stat=User unknown
Jul  4 05:35:34 oversun sm-mta[28947]: s642Z2gF028945: s642ZYgF028947: DSN: User unknown
Jul  4 05:35:44 oversun sm-mta[28947]: s642ZYgF028947: to=<[email protected]>, delay=00:00:10, xdelay=00:00:10, mailer=relay, pri=30000, relay=mx1.mail.oversun.ru. [188.127.232.5], dsn=5.1.1, stat=User unknown
Jul  4 05:35:55 oversun sm-mta[28947]: s642ZYgF028947: s642ZYgG028947: return to sender: User unknown
Jul  4 05:36:05 oversun sm-mta[28947]: s642ZYgG028947: to=root, delay=00:00:10, xdelay=00:00:10, mailer=relay, pri=30000, relay=mx1.mail.oversun.ru. [188.127.232.5], dsn=5.1.1, stat=User unknown
back to isp 1

Code: Select all

Jul  4 05:36:15 oversun sm-mta[28947]: s642ZYgF028947: Saved message in /var/lib/sendmail/dead.letter
Jul  4 05:40:02 oversun sm-mta[29635]: s642e2p4029635: from=<[email protected]>, size=522, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:40:02 oversun sm-msp-queue[29634]: s642WSoO028592: [email protected], ctladdr=nagios (1001/1001), delay=00:07:34, xdelay=00:00:01, mailer=relay, pri=120236, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s642e2p4029635 Message accepted for delivery)
Jul  4 05:40:02 oversun sm-mta[29635]: s642e2p6029635: from=<[email protected]>, size=565, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:40:02 oversun sm-msp-queue[29634]: s642UmSa028367: [email protected], ctladdr=nagios (1001/1001), delay=00:09:14, xdelay=00:00:00, mailer=relay, pri=120279, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s642e2p6029635 Message accepted for delivery)
Jul  4 05:40:02 oversun sm-mta[29635]: s642e2p8029635: from=<[email protected]>, size=565, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul  4 05:40:02 oversun sm-msp-queue[29634]: s642Sfk5028051: [email protected], ctladdr=nagios (1001/1001), delay=00:11:21, xdelay=00:00:00, mailer=relay, pri=120279, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s642e2p8029635 Message accepted for delivery)
Jul  4 05:40:02 oversun sm-mta[29635]: s642e2pA029635: from=<[email protected]>, size=633, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]

Re: sendmail problem

Posted: Fri Jul 04, 2014 3:53 am
by chris.fixter
It looks to me the problem is likely caused by [email protected] is an invalid mailbox.
Otherwise it could be that mx10.mail.oversun.ru and its friend mx1.mail.oversun.ru relays for your first ISP IP but dislike your 2nd ISP's IP.

I am not familiar with sendmail, I might be miss reading the sendmail log though. However, the hint should be the return code 2.0.0 and 5.1.1.

Re: sendmail problem

Posted: Sat Jul 05, 2014 1:58 am
by majed
Well why is it sending to root and is there a way to fix it?

Re: sendmail problem

Posted: Sun Jul 06, 2014 9:11 pm
by chris.fixter
It is probably a bounce mail from sendmail itself. So the fix would be how you designed the whole mail delivery and ISP failover.
ATM I am not sure why you do not get email alert from your 2nd ISP because I don't see any direct evidence.
Perhaps you can start off by telling us how your nagios networks are configured to failover and how you configure your sendmail.
You may also manually switch your network and execute the mail command defined in your nagios notification command from shell to see what happens.

Re: sendmail problem

Posted: Mon Jul 07, 2014 6:44 am
by eloyd
DSN: User unknown
This indicates that the username/password that you're using to connect to the SMTP server at the second site is invalid.

This is not a Nagios issue, this is a general systems administration/configuration issue.

Re: sendmail problem

Posted: Mon Jul 07, 2014 4:45 pm
by abrist
Closing as stale.