mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-01 23:25:19 -04:00
check_smtp: set default port to smtps (465) for TLS
The port can still be set with -p.
This commit is contained in:
parent
ead5526efa
commit
e823896d8a
1 changed files with 4 additions and 1 deletions
|
|
@ -50,7 +50,8 @@ int days_till_exp_warn, days_till_exp_crit;
|
|||
#endif
|
||||
|
||||
enum {
|
||||
SMTP_PORT = 25
|
||||
SMTP_PORT = 25,
|
||||
SMTPS_PORT = 465
|
||||
};
|
||||
#define PROXY_PREFIX "PROXY TCP4 0.0.0.0 0.0.0.0 25 25\r\n"
|
||||
#define SMTP_EXPECT "220"
|
||||
|
|
@ -650,6 +651,7 @@ process_arguments (int argc, char **argv)
|
|||
case 's':
|
||||
/* ssl */
|
||||
use_ssl = TRUE;
|
||||
server_port = SMTPS_PORT;
|
||||
break;
|
||||
case 'S':
|
||||
/* starttls */
|
||||
|
|
@ -879,6 +881,7 @@ print_help (void)
|
|||
printf (" %s\n", _("Minimum number of days a certificate has to be valid."));
|
||||
printf (" %s\n", "-s, --ssl");
|
||||
printf (" %s\n", _("Use SSL/TLS for the connection."));
|
||||
printf (_(" Sets default port to %d.\n"), SMTPS_PORT);
|
||||
printf (" %s\n", "-S, --starttls");
|
||||
printf (" %s\n", _("Use STARTTLS for the connection."));
|
||||
printf (" %s\n", "--sni");
|
||||
|
|
|
|||
Loading…
Reference in a new issue