diff options
author | Anders Kaseorg <andersk@mit.edu> | 2012-06-28 23:56:59 -0400 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2012-06-29 13:39:11 +0200 |
commit | dd1e9eb5eadffa4a1519c7b67f65f5aa9c586145 (patch) | |
tree | d94f6549e235ee35aad4695d092f94d66c7a69b8 /plugins/check_smtp.c | |
parent | 786196d4bbfd061cdbd0a43559d33be48b02f7cf (diff) | |
download | monitoring-plugins-dd1e9eb5eadffa4a1519c7b67f65f5aa9c586145.tar.gz |
check_smtp: Change MAIL FROM: command to comply with the SMTP standard
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>
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 0af50e32..56be585e 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
@@ -164,7 +164,7 @@ main (int argc, char **argv) | |||
164 | printf("HELOCMD: %s", helocmd); | 164 | printf("HELOCMD: %s", helocmd); |
165 | 165 | ||
166 | /* initialize the MAIL command with optional FROM command */ | 166 | /* initialize the MAIL command with optional FROM command */ |
167 | asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); | 167 | asprintf (&cmd_str, "%sFROM:<%s>%s", mail_command, from_arg, "\r\n"); |
168 | 168 | ||
169 | if (verbose && smtp_use_dummycmd) | 169 | if (verbose && smtp_use_dummycmd) |
170 | printf ("FROM CMD: %s", cmd_str); | 170 | printf ("FROM CMD: %s", cmd_str); |