Mercurial > dnsbl
comparison src/dnsbl.cpp @ 458:6c1c2bd9fb54 stable-6-0-73
ignore dnswl entries if the sender is <>
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 18 Sep 2018 09:49:21 -0700 |
parents | 2cf7183a911c |
children | 79e944269c0b |
comparison
equal
deleted
inserted
replaced
457:0199965a71eb | 458:6c1c2bd9fb54 |
---|---|
1433 else st = white; | 1433 else st = white; |
1434 } | 1434 } |
1435 else st = white; // might be <>, envelope from has no @ | 1435 else st = white; // might be <>, envelope from has no @ |
1436 } | 1436 } |
1437 | 1437 |
1438 if ((st == oksofar) || (st == whitesofar)) { | 1438 if (((st == oksofar) || (st == whitesofar)) && (strcmp(priv.mailaddr, "<>") != 0)) { |
1439 // check the dns based whitelists | 1439 // check the dns based whitelists if the sender was not empty |
1440 DNSWLP acceptlist = NULL; // list that caused the whitelisting | 1440 DNSWLP acceptlist = NULL; // list that caused the whitelisting |
1441 if (check_dnswl(priv, con.get_dnswl_list(), acceptlist)) { | 1441 if (check_dnswl(priv, con.get_dnswl_list(), acceptlist)) { |
1442 st = white; | 1442 st = white; |
1443 if (debug_syslog > 1) { | 1443 if (debug_syslog > 1) { |
1444 char msg[maxlen]; | 1444 char msg[maxlen]; |
1518 // if needed to ensure we can accept replies | 1518 // if needed to ensure we can accept replies |
1519 loto = to_lower_string(rcptaddr); | 1519 loto = to_lower_string(rcptaddr); |
1520 WHITELISTERP w = con2.find_autowhite(loto, priv.mailaddr); | 1520 WHITELISTERP w = con2.find_autowhite(loto, priv.mailaddr); |
1521 | 1521 |
1522 // check if local part is too big | 1522 // check if local part is too big |
1523 const int max_local_size = 30; | 1523 const int max_local_size = 35; |
1524 const char *p = strchr(loto, '@'); | 1524 const char *p = strchr(loto, '@'); |
1525 int len = (p) ? p-loto : max_local_size; | 1525 int len = (p) ? p-loto : max_local_size; |
1526 if (len >= max_local_size) w = NULL; // too big, pretend we don't have a whitelister | 1526 if (len >= max_local_size) w = NULL; // too big, pretend we don't have a whitelister |
1527 | 1527 |
1528 // ignore auto whitelisting from outgoing mail from localhost | 1528 // ignore auto whitelisting from outgoing mail from localhost |