check_smtp: fix positional host logic

This commit is contained in:
Lorenz Kästle 2025-03-10 20:56:09 +01:00
parent 897fef9370
commit 5cf53de34f
2 changed files with 3 additions and 1 deletions

View file

@ -697,6 +697,8 @@ check_smtp_config_wrapper process_arguments(int argc, char **argv) {
} else {
usage2(_("Invalid hostname/address"), argv[c]);
}
} else {
result.config.server_address = strdup("localhost");
}
}

View file

@ -52,7 +52,7 @@ typedef struct {
check_smtp_config check_smtp_config_init() {
check_smtp_config tmp = {
.server_port = SMTP_PORT,
.server_address = strdup("localhost"),
.server_address = NULL,
.localhostname = NULL,
.server_expect = SMTP_EXPECT,