setec / check-email-loop Goto Github PK
View Code? Open in Web Editor NEWNagios plugin to check email infrastructure via sending & retrieving emails
License: GNU General Public License v2.0
Nagios plugin to check email infrastructure via sending & retrieving emails
License: GNU General Public License v2.0
As we need AUTH LOGIN on some older Servers and struggled quite a long time to get it running with this Script ... here the Info if someone also needs it ... ;-)
Using "Net::SMTP_auth" (available on CPAN) one can easily use LOGIN Methode ... ;-)
Info: https://www.perlmonks.org/?replies=1;displaytype=print;node_id=110334
$smtp = Net::SMTP_auth->new($smtphost, Timeout=>$smtptimeout, Port=>$smtpport, starttls=>1, Hello=>$smtpehlo, %other_smtp_opts);
if( $smtp && $smtpuser ) {
#print "Sending Mail through SMTP with TLS + AUTH!\n";
$smtp->auth("LOGIN", $smtpuser, $smtppasswd);
bye from Austria
Andreas Schnederle-Wagner
Hello all,
I have created a mailbox on web.de. On this mailbox is a working rule that automatically forwards the mails to my own mail server.
I get every mail in the monitoring mailbox with the token in the subject into the inbox, but the script has still Pending mails
./check_email_loop -pophost=imap.myserver.de -passwd=password [email protected] -popauth=PASS -smtphost=smtp.web.de -from [email protected] [email protected] -lostcrit=5 --pendcrit=5 -useimap -usestarttls --imapfolder INBOX [email protected] -smtppasswd=password -usesmtpssl
Someone an idea?
When using this Plugin to Monitor Plesk Mailserver it throws this Error:
plesk-sendmail[3207]: S3207: Unable to prepare arguments for mail handlers.
The cause of the problem is the absence of a new line between the email header and the content in the mails
Previously, OS Sendmail was used instead of Plesk Sendmail when that happened.
Therefore, functions such as DKIM did not work.
No error message about the problem was printed in the maillog.
In version 18.0.38 of Plesk, such a phenomenon is now recognized as an error.
Therefore, before the OS sendmail is executed, Plesk will output an error message and stop sending mail.
To fix the problem
I can suggest that you enter a new line between the email header and the content in your website code.
Example (send_mail_ver2):
$ fp = popen ($ new_send_mail_command. "-F". $ Sender_from_addr, "w");
fputs ($ fp, $ subject);
fputs ($ fp, "\ n");
fputs ($ fp, "MIME-Version: 1.0 \ n");
fputs ($ fp, "From:". $ From_addr. "\ N");
fputs ($ fp, "To:". $ To_addr. "\ N");
fputs ($ fp, "Reply-to:". $ Reply_to. "\ n");
fputs ($ fp, "Content-Type: text / plain; charset = \" ISO-2022-jp \ "\ n");
fputs ($ fp, "Content-Transfer-Encoding: base64 \ n");
fputs ($ fp, "X-Mailer: Mailer \ n");
fputs ($ fp, "\ n"); // Add this line.
fputs ($ fp, base64_encode ($ content). "\ n");
Hello,
when I try to reach the mail server from the LAN, I get a certificate error message:
I can understand the error, is there any way to trust "insecure certificates" anyway?
./check_email_loop -poph 172.xx.xx.xx -popuser=monitor -passwd=xxx -popport=993 -usessl -useimap -smtphost=172.xx.xx.xx -smtpuser=monitor -smtppasswd=1qay-2wsx -smtpport=587 [email protected] [email protected] -usesmtptls -debug
Opened /usr/lib64/nagios/plugins/check_email_loop_e470b3b374f2dc8b185445a410ed9a1b.stat for writing...
----------------------------------------------------------------------
-------------------- Checking IMAP4 Mails ----------------------------
----------------------------------------------------------------------
IMAP RECEIVE CRITICAL - Could not connect to 172.xx.xxxx port 993: SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed at ./check_email_loop line 694.
Thx for yout help!
Rudi
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.