[nagiosplug] check_smtp: Change MAIL FROM: command to comply ...
Nagios Plugin Development
nagios-plugins at users.sourceforge.net
Fri Jun 29 14:20:33 CEST 2012
Module: nagiosplug
Branch: master
Commit: dd1e9eb5eadffa4a1519c7b67f65f5aa9c586145
Author: Anders Kaseorg <andersk at mit.edu>
Committer: Holger Weiss <holger at zedat.fu-berlin.de>
Date: Thu Jun 28 23:56:59 2012 -0400
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=dd1e9eb
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 at mit.edu>
---
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 0af50e3..56be585 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -164,7 +164,7 @@ main (int argc, char **argv)
printf("HELOCMD: %s", helocmd);
/* initialize the MAIL command with optional FROM command */
- asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n");
+ asprintf (&cmd_str, "%sFROM:<%s>%s", mail_command, from_arg, "\r\n");
if (verbose && smtp_use_dummycmd)
printf ("FROM CMD: %s", cmd_str);
More information about the Commits
mailing list