From 06e30742f0ce3f8cc2ff15bc7f733129fa3cbbf4 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Wed, 24 Dec 2003 10:04:35 +0000 Subject: - correct processing of RCPT TO responses from SMTP servers (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1098 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- include/functions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/functions.c b/include/functions.c index c962badf..637d237f 100644 --- a/include/functions.c +++ b/include/functions.c @@ -520,6 +520,7 @@ int send_email(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,c char *OK_220="220"; char *OK_250="250"; + char *OK_251="251"; char *OK_354="354"; zabbix_log( LOG_LEVEL_DEBUG, "SENDING MAIL"); @@ -671,7 +672,8 @@ int send_email(char *smtp_server,char *smtp_helo,char *smtp_email,char *mailto,c close(s); return FAIL; } - if(strncmp(OK_250,c,strlen(OK_250)) != 0) + /* May return 251 as well: User not local; will forward to . See RFC825 */ + if( strncmp(OK_250,c,strlen(OK_250)) != 0 && strncmp(OK_251,c,strlen(OK_251)) != 0) { zabbix_log(LOG_LEVEL_ERR, "Wrong answer on RCPT TO [%s]", c); close(s); -- cgit