summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-19Project rename initial commit.Monitoring Plugins Development Team1-3/+3
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.
2013-08-06Fixed SF.net bug 2555775, threshold can be double for check_smtpJan Wagner1-14/+12
Thanks to Roman Fiedler for reporting the issue and providing a fix
2012-08-10fixing bug in certificate experiation patch checking for bad warning ↵William Leibzon1-1/+1
threshold data
2012-07-04Re-added missing variable declarations to check_smtp.cEric Stanley1-0/+2
A recent update removed the declarations for a couple variables in check_smtp.c that are still being used, which caused a failure in the compilation of check_smtp.c. This commit restores those variable declarations so the check_smtp.c will again compile.
2012-06-29check_smtp: Remove a comment regarding MAIL FROMHolger Weiss1-15/+4
Earlier versions of check_smtp generated an (invalid) "MAIL FROM" command without arguments by default. These days, a "MAIL FROM" command is only sent if the --from option is specified. This commit removes a comment which explains the old behaviour, and it updates a variable name accordingly.
2012-06-29check_smtp: Fix help and usage output regarding -RHolger Weiss1-2/+2
2012-06-29check_smtp: Fix strcat overflowsAnders Kaseorg1-4/+2
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29Die when asprintf failsAnders Kaseorg1-15/+15
Fixes many instances of warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29check_smtp: Strip angle brackets from -f argument, if providedAnders Kaseorg1-1/+2
Apparently some people used -f '<nagios@example.com>' to work around the bug I just fixed in the MAIL FROM: command generation. Although the resulting command wasn't RFC-compliant, it was working with some MTAs, so let's continue to support this syntax now that we generate RFC-compliant commands. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29check_smtp: Change MAIL FROM: command to comply with the SMTP standardAnders Kaseorg1-1/+1
Every version of the SMTP standard (from RFC 821 to the current RFC 5321) requires the address following MAIL FROM: to follow the colon immediately (with no space) and to be surrounded by angle brackets. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-25applied patch that adds both critical and warning thresholds to certificate ↵William Leibzon1-11/+26
expiration checks of check_tcp, check_http, check_smtp
2011-07-15Fix check_smtp and check_tcp where duplicate messages were displayed for ↵Ton Voon1-3/+0
certificate errors (Opsview team)
2011-07-15New option to check_smtp to ignore failures when sending QUIT (#3358348 - ↵Ton Voon1-4/+26
Duncan Ferguson)
2011-02-08check_smtp: Abort on missing/unexpected greetingHolger Weiss1-2/+2
Abort immediately if we don't receive a server greeting or if the greeting doesn't contain the "--expect"ed string (by default: "220") instead of blindly sending the EHLO/HELO line. Spotted by Daniel Piddock, see Debian bug report #611914.
2010-05-08Add missing --fqdn help (Jan Wagner)Thomas Guyot-Sionnest1-2/+4
2010-04-22Add newline after "Usage:" in --helpThomas Guyot-Sionnest1-1/+1
2010-04-22Standardize the extra-opts notesThomas Guyot-Sionnest1-6/+0
2010-04-14Fix translations when extra-opts aren't enabledThomas Guyot-Sionnest1-9/+9
Bug #2832884 reported problem with translations outputting pot file headers. This is caused by "" matching the header of the translation files. This patch moves gettext macros inside utils macros and update some french translations.
2009-05-22Removed -n option in check_smtp's help and usage output (#2782784)Matthias Eble1-5/+1
Check_smtp's help showed the -n/--nocommand options to not send an SMTP command. This usage is covered by check_tcp and is thus not needed in check_smtp.
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-6/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupThomas Guyot-Sionnest1-3/+3
$ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07Added support for --extra-opts in all C plugins (disabled by default, see ↵Thomas Guyot-Sionnest1-0/+10
configure --help) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-14Enhanced check_smtp to actually print invalid response text (#1911239)Matthias Eble1-3/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1942 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-11Fixed link -m64 problems on pst3 for solaris. Fixed _FILE_OFFSET_BITSTon Voon1-2/+2
redefinition warnings. Fixed helper ar error in ./configure git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1938 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-12Import Gnulib floorf and base64 and removed our old base64 library.Thomas Guyot-Sionnest1-2/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1926 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31Bump plugin/ to GPLv3 (check_overcr to check_users)Thomas Guyot-Sionnest1-23/+19
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1917 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-09Moved base64 function to /lib.Thomas Guyot-Sionnest1-40/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1817 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-15Properly handle SMTP server responses which are split into multipleHolger Weiss1-18/+72
packets (noted by Chris Adams on nagiosplug-help@). TODO: The new recvline()/recvlines() functions should buffer received data instead of reading one byte at a time and they should be moved to netutils.c so that other plugins can use them, too. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1780 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-31Read the response to an SMTP QUIT command before closing the socketHolger Weiss1-3/+28
(noted by Dieter Hendricks on nagiosplug-help@) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1769 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-14Fixed segfault in argument processing. Thanks to Christoph Schell (#1742066)Matthias Eble1-4/+8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1757 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-06Fixed compile errors in check_smtp.cTon Voon1-11/+11
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1631 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-06Fixed broken HELO cmd (Enrico Scholz - 1675279)Ton Voon1-5/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1630 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-06correcting some translation problemsBenoit Mortier1-3/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1611 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-24Sync with gnulib - lots of extraneous code removed in preference to GNU codeTon Voon1-4/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19another round of localization cleaningBenoit Mortier1-3/+6
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1509 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-12Resend EHLO after TLS negotiation as per RFC3207 (Holger Weiss - 1482832)Ton Voon1-2/+32
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1493 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-20cleaning help and usage + licenseBenoit Mortier1-59/+70
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1435 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-25Use coreutils' regexp libraries, so regexp always available nowTon Voon1-10/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1403 f882894a-f735-0410-b71e-b25c423dba1c
2005-11-02check_smtp.cM. Sean Finney1-8/+164
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1268 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19all plugins now using centralized ssl functions in netutils.cM. Sean Finney1-198/+20
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1257 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19- initial attempt at consolidating ssl-related code into netutils.{c,h}M. Sean Finney1-1/+9
- added some #ifdefs to common.h and netutils.h to prevent multiple inclusions (as netlibs now includes common.h) - all ssl plugins (tcp/http/smtp) compile cleanly against gnutls, though certificate checking still needs to be done. - modified configure script so you can also explicitly say "without-gnutls" too (otherwise if you disable openssl you have no way of disabling gnutls too) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1255 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-13multiple fixes in check_smtp from debian (bts #285554):M. Sean Finney1-21/+65
- fix for double free via SSL_CTX_free. looks like the previous author knew this was a problem but didn't care enough to fix it ;p. - use defines instead of const chars for SMTP strings. - default to send our fqdn (via gethostbyname lookup on gethostname) in the HELO string, as this is an RFC/SMTP requirement. overridable via cmdline. - use EHLO instead of HELO if using STARTTLS, as it is not SMTP but ESMTP. - verify the server supports STARTTLS before initializing it. - always send QUIT before disconnecting when possible. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1246 f882894a-f735-0410-b71e-b25c423dba1c
2005-04-07in honor of joining up, my first bugfix. this should resolve 1174070.M. Sean Finney1-10/+7
note i don't have an exchange server to test this against, but it does what the requester mentioned (slightly cleaner than the patch attached in the tracker). it does, however, still work against my own postfix server :) sean git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1158 f882894a-f735-0410-b71e-b25c423dba1c
2005-04-04Fix static buffer (Nikolay Sturm)Ton Voon1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1155 f882894a-f735-0410-b71e-b25c423dba1c
2005-03-04Fixed // comments (Steve Greenland - 1143836)Ton Voon1-4/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1146 f882894a-f735-0410-b71e-b25c423dba1c
2005-01-01Removed old terminate function (Bug 1093491)Ton Voon1-2/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1074 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-30more internationalization fixesBenoit Mortier1-6/+6
internationalization freeze for beta1 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1067 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-28starttls support for check_smtp #1041576Benoit Mortier1-13/+272
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1065 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25various fixes for localizationBenoit Mortier1-4/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c