summaryrefslogtreecommitdiffstats
path: root/include/functions.c
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-12-24 10:04:35 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-12-24 10:04:35 +0000
commit06e30742f0ce3f8cc2ff15bc7f733129fa3cbbf4 (patch)
treece7888b241b0fb5f92456d5c1f15e23e7843a1a5 /include/functions.c
parent446520fb44753f18c2f4c921831c20fbc5d55585 (diff)
downloadzabbix-06e30742f0ce3f8cc2ff15bc7f733129fa3cbbf4.tar.gz
zabbix-06e30742f0ce3f8cc2ff15bc7f733129fa3cbbf4.tar.xz
zabbix-06e30742f0ce3f8cc2ff15bc7f733129fa3cbbf4.zip
- correct processing of RCPT TO responses from SMTP servers
(Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1098 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include/functions.c')
-rw-r--r--include/functions.c4
1 files changed, 3 insertions, 1 deletions
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 <forward-path>. 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);