소스 검색

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>
Anders Kaseorg 14 년 전
부모
커밋
dd1e9eb5ea
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      plugins/check_smtp.c

+ 1 - 1
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);