summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-18Simply initializes n before it is usedrefs/pull/1574/headIustin Pop1-0/+1
When SSL is enabled, n is assigned the size of the server's second EHLO response (I think in bytes), which will usually be significantly higher than the command passed. As such, no commands are executed and no responses are checked, which - silently - defeats the desired checks and results in a success value.
2016-12-01Spelling fixes suggested by lintianrefs/pull/1452/headJan Wagner1-1/+1
2016-11-19Merge pull request #1382 from riskersen/smtp_tls_expecOliver Skibbe1-15/+22
check_smtp: extended support for expect option
2016-11-18Merge remote-tracking branch 'monitoring-plugins/pr/1443'Holger Weiss1-3/+5
* monitoring-plugins/pr/1443: add openssl 1.1 support
2016-11-17check_radius: Replace functions removed in radcliHolger Weiss1-4/+0
The radcli library no longer offers the rc_get_ipaddr(), rc_good_ipaddr(), and rc_own_ipaddress() functions.
2016-11-13add openssl 1.1 supportrefs/pull/1443/headvagrant1-3/+5
changes: - CRYPTO_lock detection replaced in configure.ac. We don't use that function anywhere, so just replace it with the suggested one from https://wiki.openssl.org/index.php/Library_Initialization#Autoconf - OPENSSL_NO_SSL2 is no longer defined while ssl2 is not included. Set it ourself using the suggested openssl 1.1 version check from https://wiki.openssl.org/index.php/1.1_API_Changes#Backward_compatibility - openssl 1.1 sends a sigpipe if the connection is still open when calling SSL_shutdown(), so move the close before the shutdown. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-08check_smtp: extended support for expect optionrefs/pull/1382/headOliver Skibbe1-15/+22
expect option (-e) supported only first response, so checking for any other response like 250-xxx would never match. This fix stores return of relevant buffer closes #1381
2015-10-08check_smtp.c: modified SSL check for use with -erefs/pull/1379/headOliver Skibbe1-1/+1
- currently STARTTLS check does not work with -e if there's text like '220 hostname ESMTP*'. This is caused by SMTP answer from host. Postfix answer: 220 2.0.0 Ready to start TLS, Exchange 2010: 220 2.0.0 SMTP server ready. This fix checks against 220 closes #1093
2015-10-06check_smtp: Let "-D" option imply "-S"Holger Weiss1-5/+4
2015-10-06check_smtp: QUIT SMTP connection when "-D" is usedHolger Weiss1-0/+2
Don't forget to issue an SMTP QUIT command when the -D/--certificate option is specified. This avoids undesired MTA log messages.
2015-10-04use unknown exit code for help/version in pluginsSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-01-21Merge branch 'rename'Thomas Guyot-Sionnest1-3/+3
2014-01-21plugins/*.c: Alterations for timeout messages.Spenser Reinhardt1-1/+1
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim. Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-20Capitalize "Monitoring" when it's the first wordHolger Weiss1-1/+1
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