comparison src/dnsbl.cpp @ 162:c4bce911c276 stable-6-03

don't add auto whitelist for A to A
author carl
date Sat, 14 Jul 2007 12:25:17 -0700
parents ea7c57a4a2d1
children 97d7da45fe2a
comparison
equal deleted inserted replaced
161:d384df37491f 162:c4bce911c276
1021 return SMFIS_REJECT; 1021 return SMFIS_REJECT;
1022 } 1022 }
1023 } 1023 }
1024 // we will accept the recipient, but add an auto-whitelist entry 1024 // we will accept the recipient, but add an auto-whitelist entry
1025 // if needed to ensure we can accept replies 1025 // if needed to ensure we can accept replies
1026 WHITELISTERP w = con2.find_autowhite(priv.mailaddr); 1026 loto = to_lower_string(rcptaddr);
1027 WHITELISTERP w = con2.find_autowhite(loto, priv.mailaddr);
1027 if (w) { 1028 if (w) {
1028 char *loto = to_lower_string(rcptaddr);
1029 if (debug_syslog > 1) { 1029 if (debug_syslog > 1) {
1030 char buf[maxlen]; 1030 char buf[maxlen];
1031 char msg[maxlen]; 1031 char msg[maxlen];
1032 snprintf(msg, sizeof(msg), "whitelist reply from <%s> in context %s", loto, con2.get_full_name(buf,maxlen)); 1032 snprintf(msg, sizeof(msg), "whitelist reply from <%s> in context %s", loto, con2.get_full_name(buf,maxlen));
1033 my_syslog(&priv, msg); 1033 my_syslog(&priv, msg);
1034 } 1034 }
1035 w->sent(loto); // don't free it, the whitelister takes ownership of the string 1035 w->sent(loto); // don't free it, the whitelister takes ownership of the string
1036 }
1037 else {
1038 free(loto);
1036 } 1039 }
1037 // accept the recipient 1040 // accept the recipient
1038 if (!con.get_content_filtering()) st = white; 1041 if (!con.get_content_filtering()) st = white;
1039 if (st == oksofar) { 1042 if (st == oksofar) {
1040 // but remember the non-whites 1043 // but remember the non-whites