mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-09 08:42:17 -04:00
check_smtp: Strip angle brackets from -f argument, if provided
Apparently some people used -f '<nagios@example.com>' to work around the bug I just fixed in the MAIL FROM: command generation. Although the resulting command wasn't RFC-compliant, it was working with some MTAs, so let's continue to support this syntax now that we generate RFC-compliant commands. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
dd1e9eb5ea
commit
9976876584
1 changed files with 2 additions and 1 deletions
|
|
@ -521,7 +521,8 @@ process_arguments (int argc, char **argv)
|
|||
localhostname = strdup(optarg);
|
||||
break;
|
||||
case 'f': /* from argument */
|
||||
from_arg = optarg;
|
||||
from_arg = optarg + strspn(optarg, "<");
|
||||
from_arg = strndup(from_arg, strcspn(from_arg, ">"));
|
||||
smtp_use_dummycmd = 1;
|
||||
break;
|
||||
case 'A':
|
||||
|
|
|
|||
Loading…
Reference in a new issue