summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-19check_smtp: Restore behaviour pre ead5526efa4f713e8001baed409067b0474cb72d ↵refs/pull/1952/headRincewindsHat1-1/+10
regarding -D and TLS
2023-10-19check_smtp: little fix for C99 booleans missed earlierRincewindsHat1-1/+1
2023-10-18check_smtp: Use C99 booleansRincewindsHat1-25/+25
2023-08-29check_smtp: Let port option always take precedenceFranz Schwartau1-1/+6
Otherwise -s/--ssl would overwrite a port given with -p if it comes after it, e. g. check_smtp -H mailhost.example.com -p 4465 --ssl Found-By: Lorenz Kästle
2023-08-29check_smtp: add new longoption --tlsFranz Schwartau1-2/+3
This is an alias for -s/--ssl.
2023-08-29check_smtp: remove restriction of --proxy with --sslFranz Schwartau1-11/+7
2023-08-29check_smtp: set default port to smtps (465) for TLSFranz Schwartau1-1/+4
The port can still be set with -p.
2023-08-29Add support for SMTP over TLSFranz Schwartau1-9/+37
This is commonly used on smtps (465) port. PROXY protocol is not implemented with TLS in check_smtp.c, yet. Backported from nagios-plugins: https://github.com/nagios-plugins/nagios-plugins/commit/0a8cf08ebb0740aa55d6c60d3b79fcab282604fb
2023-06-28Merge branch 'master' into compiler_warning_part_2refs/pull/1867/headwaja1-4/+34
2023-06-12Add support for SNI in check_smtp.Arkadiusz Miśkiewicz1-2/+17
Add support for SSL/TLS hostname extension support (SNI) for check_smtp plugin. Backported from nagios-plugins: https://github.com/nagios-plugins/nagios-plugins/commit/9f1628f4b5525335ce1d6e48e8ac8b07d0757f82
2023-06-12check_smtp: update year in copyright headerrefs/pull/1885/headFranz Schwartau1-1/+1
2023-06-12check_smtp: add missing -r option in usageFranz Schwartau1-1/+1
2023-06-12check_smtp: Add option to prefix PROXY headerPatrick Uiterwijk1-1/+16
This enables checks of SMTP servers that expect the haproxy PROXY protocol: -o smtpd_upstream_proxy_protocol=haproxy. Backported from nagios-plugins: https://github.com/nagios-plugins/nagios-plugins/commit/3246efe923b5482c5024c40e593ce942e628a3cb
2023-04-17Fixes for -Wimplicit-fallthroughRincewindsHat1-0/+1
2023-04-14Fix a lot of typos reported by codespellrefs/pull/1864/headJan Wagner1-1/+1
2021-10-28check_smtp: add -L flag to support LMTP (LHLO instead of HELO/EHLO).refs/pull/1715/headGeert Hendrickx1-4/+14
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