summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorFranz Schwartau <franz@electromail.org>2023-06-14 18:27:24 +0200
committerFranz Schwartau <franz@electromail.org>2023-08-29 09:46:50 +0200
commite823896d8a39618e0cb60c5cd4e46f13bbc6a51d (patch)
tree30fb42a7b05b364792771c6c64ff240d039caef0 /plugins
parentead5526efa4f713e8001baed409067b0474cb72d (diff)
downloadmonitoring-plugins-e823896d8a39618e0cb60c5cd4e46f13bbc6a51d.tar.gz
check_smtp: set default port to smtps (465) for TLS
The port can still be set with -p.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_smtp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index f3ba9e38..474557d5 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -50,7 +50,8 @@ int days_till_exp_warn, days_till_exp_crit;
50#endif 50#endif
51 51
52enum { 52enum {
53 SMTP_PORT = 25 53 SMTP_PORT = 25,
54 SMTPS_PORT = 465
54}; 55};
55#define PROXY_PREFIX "PROXY TCP4 0.0.0.0 0.0.0.0 25 25\r\n" 56#define PROXY_PREFIX "PROXY TCP4 0.0.0.0 0.0.0.0 25 25\r\n"
56#define SMTP_EXPECT "220" 57#define SMTP_EXPECT "220"
@@ -650,6 +651,7 @@ process_arguments (int argc, char **argv)
650 case 's': 651 case 's':
651 /* ssl */ 652 /* ssl */
652 use_ssl = TRUE; 653 use_ssl = TRUE;
654 server_port = SMTPS_PORT;
653 break; 655 break;
654 case 'S': 656 case 'S':
655 /* starttls */ 657 /* starttls */
@@ -879,6 +881,7 @@ print_help (void)
879 printf (" %s\n", _("Minimum number of days a certificate has to be valid.")); 881 printf (" %s\n", _("Minimum number of days a certificate has to be valid."));
880 printf (" %s\n", "-s, --ssl"); 882 printf (" %s\n", "-s, --ssl");
881 printf (" %s\n", _("Use SSL/TLS for the connection.")); 883 printf (" %s\n", _("Use SSL/TLS for the connection."));
884 printf (_(" Sets default port to %d.\n"), SMTPS_PORT);
882 printf (" %s\n", "-S, --starttls"); 885 printf (" %s\n", "-S, --starttls");
883 printf (" %s\n", _("Use STARTTLS for the connection.")); 886 printf (" %s\n", _("Use STARTTLS for the connection."));
884 printf (" %s\n", "--sni"); 887 printf (" %s\n", "--sni");