Hi Alex! It seems as though check_smtp doesn't actually send an email, just checks to see if it can connect via SMTP to the server. In the below case, it connected + authenticated fine.
There are some other plugins e.g. check_smtp_send that also sends an email (e.g. http://buhacoff.net/software/check_email_delivery/manual.html - I just found this via google so YMMV). If I were you and only going to setup check_smtp_send, it seems better to just setup a cronjob or something to send a test email every minute or so - then you can check the recipient mailbox via a nagios check (check email arrived in last n minutes + delete old ones) to make sure all your pipes are working properly. We use check_smtp to check our mail servers, also checks on the active send/receive smtp sessions/mail queues across our servers (these would do weird things if things break), and also use a completely external monitoring service (alertsite) for end-end mailflow monitoring - that escalates via phone. Hope this helps :) Cheers Gareth -----Original Message----- From: Help [mailto:help-bounces+gareth.fletcher=onenet.co...@monitoring-plugins.org] On Behalf Of Alex Domoradov Sent: Tuesday, 18 February 2014 9:02 a.m. To: help@monitoring-plugins.org Subject: check_smtp and authentication Hello all, Is anyone could give a work example of the check_smtp plugin? I just want to send mail via out smtp relay with authentication. I have tried the following example # ./check_smtp -H mail.example.net -A LOGIN -U u...@example.net -P 1234567 --starttls -v --fqdn=www.example.net -C "mail from:<u...@example.net>" -C "rcpt to:<u...@gmail.com>" -C "DATA" -C "Hello world" -C "." -C "quit" HELOCMD: EHLO www.example.net 220 mail.psd2html.com ESMTP sent EHLO www.example.net 250-mail.example.net 250-PIPELINING 250-SIZE 20971520 250-ETRN 250-AUTH LOGIN CRAM-MD5 PLAIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN sent AUTH LOGIN received 334 VXNlcm5hbWU6 sent YWtbC5jb20RvbW9yYWRvdkBwc2QyaHR= received 334 UGFdvcmQ6zc3 sent TUxg5cXVQbTcDg== received 235 2.7.0 Authentication successful sent QUIT received 221 2.0.0 Bye SMTP OK - 1.693 sec. response time, 221 2.0.0 Bye |time=1.692533s;;;0.000000 But at the same time in mail lof I get the following lines Feb 17 19:33:13 mail postfix/smtpd[14943]: connect from www.example.net[xxx.xxx.xxx.xxx] Feb 17 19:33:14 mail postfix/smtpd[14943]: Anonymous TLS connection established from www.example.net[xxx.xxx.xxx.xxx]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) Feb 17 19:33:15 mail postfix/smtpd[14943]: disconnect from www.example.net[xxx.xxx.xxx.xxx] How can I send some data?