Page 2 of 2

Re: Nagios Mail / Postfix

Posted: Mon May 04, 2015 2:48 am
by Expertise
HI, yes with -r flag its send perfectly but before i dont use -r and i send 2 mail test perfectly too, i find old log who works.

test work:

Code: Select all

Apr 24 17:53:14 expertise2-VirtualBox postfix/qmgr[28593]: 5958933A19: from=<expertisemultimediatest@gmail.com>, size=398, nrcpt=1 (queue active)
Apr 24 17:53:14 expertise2-VirtualBox postfix/smtp[28703]: 5958933A19: to=<expertisexxx@gmail.com>, relay=smtp.gmail.com[64.233.167.109]:587, delay=937, delays=936/0.02/0.23/0.03, dsn=5.7.0, status=bounced (host smtp.gmail.com[64.233.167.109] said: 530 5.7.0 Must issue a STARTTLS command first. e2sm3900064wix.15 - gsmtp (in reply to MAIL FROM command))
Apr 24 17:53:14 expertise2-VirtualBox postfix/cleanup[28705]: EA13F33A2A: message-id=<20150424155314.EA13F33A2A@expertise2-VirtualBox>
Apr 24 17:53:14 expertise2-VirtualBox postfix/qmgr[28593]: EA13F33A2A: from=<>, size=2462, nrcpt=1 (queue active)
Apr 24 17:53:14 expertise2-VirtualBox postfix/bounce[28704]: 5958933A19: sender non-delivery notification: EA13F33A2A
Apr 24 17:53:14 expertise2-VirtualBox postfix/qmgr[28593]: 5958933A19: removed
Apr 24 17:53:14 expertise2-VirtualBox postfix/smtp[28703]: connect to smtp.gmail.com[2a00:1450:400c:c0a::6d]:587: Network is unreachable
Apr 24 17:53:15 expertise2-VirtualBox postfix/smtp[28703]: EA13F33A2A: to=<expertisexxx@gmail.com>, relay=smtp.gmail.com[64.233.167.108]:587, delay=0.17, delays=0.01/0/0.13/0.03, dsn=5.7.0, status=bounced (host smtp.gmail.com[64.233.167.108] said: 530 5.7.0 Must issue a STARTTLS command first. js3sm17211792wjc.5 - gsmtp (in reply to MAIL FROM command))
Apr 24 17:53:15 expertise2-VirtualBox postfix/qmgr[28593]: EA13F33A2A: removed
Apr 24 17:53:50 expertise2-VirtualBox postfix/master[28589]: terminating on signal 15
Apr 24 17:53:51 expertise2-VirtualBox postfix/master[28869]: daemon started -- version 2.11.0, configuration /etc/postfix
Apr 24 17:53:57 expertise2-VirtualBox postfix/pickup[28872]: A886133A27: uid=0 from=<expertisexxx@gmail.com>
Apr 24 17:53:57 expertise2-VirtualBox postfix/cleanup[28878]: A886133A27: message-id=<20150424155357.A886133A27@expertise2-VirtualBox>
Apr 24 17:53:57 expertise2-VirtualBox postfix/qmgr[28873]: A886133A27: from=<expertisexxx@gmail.com>, size=398, nrcpt=1 (queue active)
Apr 24 17:53:58 expertise2-VirtualBox postfix/smtp[28880]: A886133A27: to=<expertisexxx@gmail.com>, relay=smtp.orange.fr[193.252.22.64]:25, delay=0.45, delays=0.02/0.01/0.23/0.19, dsn=2.0.0, status=sent (250 2.0.0 KqqR1q0080wtnN103qqRml mail accepted for delivery)
Apr 24 17:53:58 expertise2-VirtualBox postfix/qmgr[28873]: A886133A27: removed
Apr 24 17:56:05 expertise2-VirtualBox postfix/pickup[28872]: 8C9C533A27: uid=0 from=<terminal@expertise2-VirtualBox>
Apr 24 17:56:05 expertise2-VirtualBox postfix/cleanup[28919]: 8C9C533A27: message-id=<20150424155605.8C9C533A27@expertise2-VirtualBox>
Apr 24 17:56:05 expertise2-VirtualBox postfix/qmgr[28873]: 8C9C533A27: from=<terminal@expertise2-VirtualBox>, size=417, nrcpt=1 (queue active)
Apr 24 17:56:06 expertise2-VirtualBox postfix/smtp[28921]: 8C9C533A27: to=<expertisexxx@gmail.com>, relay=smtp.orange.fr[193.252.22.64]:25, delay=1.3, delays=0.02/0.01/0.2/1.1, dsn=5.1.0, status=bounced (host smtp.orange.fr[193.252.22.64] said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405] (in reply to MAIL FROM command))
Apr 24 17:56:06 expertise2-VirtualBox postfix/cleanup[28919]: EB0EE33A2A: message-id=<20150424155606.EB0EE33A2A@expertise2-VirtualBox>
Apr 24 17:56:06 expertise2-VirtualBox postfix/qmgr[28873]: EB0EE33A2A: from=<>, size=2449, nrcpt=1 (queue active)
Apr 24 17:56:06 expertise2-VirtualBox postfix/bounce[28922]: 8C9C533A27: sender non-delivery notification: EB0EE33A2A
Apr 24 17:56:06 expertise2-VirtualBox postfix/qmgr[28873]: 8C9C533A27: removed
Apr 24 17:56:06 expertise2-VirtualBox postfix/local[28923]: EB0EE33A2A: to=<terminal@expertise2-VirtualBox>, relay=local, delay=0.03, delays=0.01/0.02/0/0, dsn=5.1.1, status=bounced (unknown user: "terminal")
Apr 24 17:56:06 expertise2-VirtualBox postfix/qmgr[28873]: EB0EE33A2A: removed
Apr 24 17:57:27 expertise2-VirtualBox postfix/pickup[28872]: C134833A27: uid=0 from=<expertisexxx@gmail.com>
Apr 24 17:57:27 expertise2-VirtualBox postfix/cleanup[28919]: C134833A27: message-id=<20150424155727.C134833A27@expertise2-VirtualBox>
Apr 24 17:57:27 expertise2-VirtualBox postfix/qmgr[28873]: C134833A27: from=<expertisexxx@gmail.com>, size=407, nrcpt=1 (queue active)
Apr 24 17:57:28 expertise2-VirtualBox postfix/smtp[28921]: C134833A27: to=<expertisexxx@gmail.com>, relay=smtp.orange.fr[80.12.242.10]:25, delay=0.32, delays=0.01/0/0.17/0.14, dsn=2.0.0, status=sent (250 2.0.0 Kqtt1q0030wtnN103qttYg mail accepted for delivery)
Apr 24 17:57:28 expertise2-VirtualBox postfix/qmgr[28873]: C134833A27: removed
this morning not work :

Code: Select all

May  4 12:55:01 expertise2-VirtualBox postfix/pickup[28582]: B383D33ABB: uid=0 from=<root>
May  4 12:55:01 expertise2-VirtualBox postfix/cleanup[30339]: B383D33ABB: message-id=<20150504105501.B383D33ABB@expertise2-VirtualBox>
May  4 12:55:01 expertise2-VirtualBox postfix/qmgr[28873]: B383D33ABB: from=<root@expertise2-VirtualBox>, size=601, nrcpt=1 (queue active)
May  4 12:55:01 expertise2-VirtualBox postfix/local[30341]: B383D33ABB: to=<root@expertise2-VirtualBox>, orig_to=<root>, relay=local, delay=0.02, delays=0.02/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May  4 12:55:01 expertise2-VirtualBox postfix/qmgr[28873]: B383D33ABB: removed
May  4 12:56:33 expertise2-VirtualBox postfix/pickup[28582]: 7518833ABB: uid=1001 from=<nagios@expertise2-VirtualBox>
May  4 12:56:33 expertise2-VirtualBox postfix/cleanup[30339]: 7518833ABB: message-id=<20150504105633.7518833ABB@expertise2-VirtualBox>
May  4 12:56:33 expertise2-VirtualBox postfix/qmgr[28873]: 7518833ABB: from=<nagios@expertise2-VirtualBox>, size=694, nrcpt=1 (queue active)
May  4 12:56:34 expertise2-VirtualBox postfix/smtp[30391]: 7518833ABB: to=<expertisexxx@gmail.com>, relay=smtp.orange.fr[193.252.22.64]:25, delay=1.4, delays=0.02/0.01/0.25/1.1, dsn=5.1.0, status=bounced (host smtp.orange.fr[193.252.22.64] said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405] (in reply to MAIL FROM command))
May  4 12:56:34 expertise2-VirtualBox postfix/cleanup[30339]: D76DD33ABC: message-id=<20150504105634.D76DD33ABC@expertise2-VirtualBox>
May  4 12:56:34 expertise2-VirtualBox postfix/qmgr[28873]: D76DD33ABC: from=<>, size=2720, nrcpt=1 (queue active)
May  4 12:56:34 expertise2-VirtualBox postfix/bounce[30392]: 7518833ABB: sender non-delivery notification: D76DD33ABC
May  4 12:56:34 expertise2-VirtualBox postfix/local[30341]: D76DD33ABC: to=<nagios@expertise2-VirtualBox>, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May  4 12:56:34 expertise2-VirtualBox postfix/qmgr[28873]: D76DD33ABC: removed
May  4 12:56:34 expertise2-VirtualBox postfix/qmgr[28873]: 7518833ABB: removed
May  4 13:00:01 expertise2-VirtualBox postfix/pickup[28582]: BCBEB33ABB: uid=0 from=<root>
May  4 13:00:01 expertise2-VirtualBox postfix/cleanup[30502]: BCBEB33ABB: message-id=<20150504110001.BCBEB33ABB@expertise2-VirtualBox>
May  4 13:00:01 expertise2-VirtualBox postfix/qmgr[28873]: BCBEB33ABB: from=<root@expertise2-VirtualBox>, size=601, nrcpt=1 (queue active)
May  4 13:00:01 expertise2-VirtualBox postfix/local[30504]: BCBEB33ABB: to=<root@expertise2-VirtualBox>, orig_to=<root>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May  4 13:00:01 expertise2-VirtualBox postfix/qmgr[28873]: BCBEB33ABB: removed
May  4 13:00:57 expertise2-VirtualBox postfix/pickup[28582]: 2553533ABB: uid=1001 from=<nagios@expertise2-VirtualBox>
May  4 13:00:57 expertise2-VirtualBox postfix/cleanup[30502]: 2553533ABB: message-id=<20150504110057.2553533ABB@expertise2-VirtualBox>
May  4 13:00:57 expertise2-VirtualBox postfix/qmgr[28873]: 2553533ABB: from=<nagios@expertise2-VirtualBox>, size=610, nrcpt=1 (queue active)
May  4 13:00:58 expertise2-VirtualBox postfix/smtp[30533]: 2553533ABB: to=<expertisexxx@gmail.com>, relay=smtp.orange.fr[80.12.242.10]:25, delay=1.3, delays=0.01/0.01/0.22/1.1, dsn=5.1.0, status=bounced (host smtp.orange.fr[80.12.242.10] said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405] (in reply to MAIL FROM command))
May  4 13:00:58 expertise2-VirtualBox postfix/cleanup[30502]: 7C28E33ABC: message-id=<20150504110058.7C28E33ABC@expertise2-VirtualBox>
May  4 13:00:58 expertise2-VirtualBox postfix/qmgr[28873]: 7C28E33ABC: from=<>, size=2635, nrcpt=1 (queue active)
May  4 13:00:58 expertise2-VirtualBox postfix/bounce[30534]: 2553533ABB: sender non-delivery notification: 7C28E33ABC
May  4 13:00:58 expertise2-VirtualBox postfix/local[30504]: 7C28E33ABC: to=<nagios@expertise2-VirtualBox>, relay=local, delay=0.02, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May  4 13:00:58 expertise2-VirtualBox postfix/qmgr[28873]: 7C28E33ABC: removed
May  4 13:00:58 expertise2-VirtualBox postfix/qmgr[28873]: 2553533ABB: removed

Re: Nagios Mail / Postfix

Posted: Mon May 04, 2015 9:24 am
by jdalrymple
As I mentioned before Gmail will never... ever... ever accept an E-mail from this address:

Code: Select all

May  4 12:55:01 expertise2-VirtualBox postfix/qmgr[28873]: B383D33ABB: from=<root@expertise2-VirtualBox>, size=601, nrcpt=1 (queue active)
In your test that worked:

Code: Select all

Apr 24 17:53:14 expertise2-VirtualBox postfix/qmgr[28593]: 5958933A19: from=<expertisemultimediatest@gmail.com>, size=398, nrcpt=1 (queue active)
As you can clearly see, something changed in your mail configuration between Apr 24 and May 4 - namely something that set the from address.

Re: Nagios Mail / Postfix

Posted: Mon May 04, 2015 9:50 am
by Expertise
i try and install MRTG, do you think he is corrupted my postfix ? since i install MRTG i have now "you have a new mail ect... " after every command line in terminal, and every five mn i have mail in root,

do you think reinstall postfix ?

Re: Nagios Mail / Postfix

Posted: Mon May 04, 2015 10:05 am
by jdalrymple
No - postfix is working fine. Whatever mail agent is trying to relay mail is trying to do it with a malformed address. Fix the malformed address and all of your problems will disappear. We cannot be sure what the agent is, but I suspect your "root has new mail" is nothing but the bounce messages.

Re: Nagios Mail / Postfix

Posted: Mon May 04, 2015 10:11 am
by ssax

Re: Nagios Mail / Postfix

Posted: Wed May 06, 2015 9:40 am
by Expertise
I block MRTG, i desable crontab -e and runasdaemon off on it and i don't have "you have new mail on root".

now my command "echo "test de mail" | mail -s "voici le message" expertisexxx@gmail.com" doesn't work.

if i want work now i need add " -r blabla@blabla.fr " why ??

i my first install of postfix i send mail without -r and its works after install MRTG i need too add -r is mrtg erase "from" paramater of mail ?

EDIT : i add too -r in commands.cfg of "notify-host-by-email" and "notify-service-by-email" i add -r expertisexxx@gmail.com and nagios send correctly my warning in mailbox gmail.

Re: Nagios Mail / Postfix

Posted: Wed May 06, 2015 9:44 am
by jdalrymple
Expertise wrote:if i want work now i need add " -r blabla@blabla.fr " why ??

i my first install of postfix i send mail without -r and its works after install MRTG i need too add -r is mrtg erase "from" paramater of mail ?
There is no way for us to tell what has changed on your system, but I've already explained to you WHY it is broken. Most MTAs WILL NOT accept mail from the malformed address you're sending it from. Having a sane from address is a bare essential for spam prevention, additionally what is the point of having E-mail coming from an address that cannot be replied to?

Is there a specific reason you're averse to adding the -r argument to your mail command? There is nothing wrong with it.

Re: Nagios Mail / Postfix

Posted: Wed May 06, 2015 10:38 am
by Expertise
i add too -r in commands.cfg of "notify-host-by-email" and "notify-service-by-email" i add -r expertisexxx@gmail.com and nagios send correctly my warning in mailbox gmail.


good mail send by nagios with -r in commands.

Code: Select all

De:	 expertisexxx@gmail.com
à:	expertisexxx@gmail.com
Date:	6 mai 2015 22:38
Objet:	** PROBLEM Service Alert: Staxx luxxx 197/bit-rate is UNKNOWN **

Re: Nagios Mail / Postfix

Posted: Wed May 06, 2015 10:39 am
by jdalrymple
Glad that worked - I think you should be good now with regard to E-mailing. Is it OK to lock this topic?

Re: Nagios Mail / Postfix

Posted: Thu May 07, 2015 3:31 am
by Expertise
ok now it works but its mystery LOL

thx for all your tips see you soon ;)