summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index f7c826b2..c4e427a6 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -41,8 +41,8 @@ int server_port = SMTP_PORT;
41char *server_address = NULL; 41char *server_address = NULL;
42char *server_expect = NULL; 42char *server_expect = NULL;
43int smtp_use_dummycmd = 1; 43int smtp_use_dummycmd = 1;
44char *mail_command = "MAIL "; 44char *mail_command;
45char *from_arg = " "; 45char *from_arg;
46int warning_time = 0; 46int warning_time = 0;
47int check_warning_time = FALSE; 47int check_warning_time = FALSE;
48int critical_time = 0; 48int critical_time = 0;
@@ -60,7 +60,7 @@ main (int argc, char **argv)
60 int sd; 60 int sd;
61 double elapsed_time; 61 double elapsed_time;
62 int result = STATE_UNKNOWN; 62 int result = STATE_UNKNOWN;
63 char buffer[MAX_INPUT_BUFFER] = ""; 63 char buffer[MAX_INPUT_BUFFER];
64 char *from_str = NULL; 64 char *from_str = NULL;
65 char *helocmd = NULL; 65 char *helocmd = NULL;
66 struct timeval tv; 66 struct timeval tv;
@@ -313,7 +313,13 @@ process_arguments (int argc, char **argv)
313 } 313 }
314 314
315 if (server_expect == NULL) 315 if (server_expect == NULL)
316 asprintf (&server_expect, SMTP_EXPECT); 316 server_expect = strdup (SMTP_EXPECT);
317
318 if (mail_command == NULL)
319 mail_command = strdup("MAIL ");
320
321 if (from_arg==NULL)
322 from_arg = strdup(" ");
317 323
318 return validate_arguments (); 324 return validate_arguments ();
319} 325}