comparison src/dnsbl.cpp @ 142:b82e00146672 stable-5-22

always log smth auth rate counts
author carl
date Thu, 28 Sep 2006 08:43:32 -0700
parents 4028de9b46dd
children ecb40aa3eaa5
comparison
equal deleted inserted replaced
141:6256cab02248 142:b82e00146672
959 char *fromvalue = con.find_from(priv.mailaddr); 959 char *fromvalue = con.find_from(priv.mailaddr);
960 status st; 960 status st;
961 if (priv.authenticated) { 961 if (priv.authenticated) {
962 int c = incr_rcpt_count(priv.authenticated); 962 int c = incr_rcpt_count(priv.authenticated);
963 int l = dc.default_context->find_rate(priv.authenticated); 963 int l = dc.default_context->find_rate(priv.authenticated);
964 if (debug_syslog > 1) {
965 char buf[maxlen];
966 char msg[maxlen];
967 snprintf(msg, sizeof(msg), "authenticated id %s (%d recipients, %d limit)", priv.authenticated, c, l);
968 my_syslog(&priv, msg);
969 }
964 if (c > l) { 970 if (c > l) {
965 smfi_setreply(ctx, "550", "5.7.1", "recipient rate limit exceeded"); 971 smfi_setreply(ctx, "550", "5.7.1", "recipient rate limit exceeded");
966 return SMFIS_REJECT; 972 return SMFIS_REJECT;
967 } 973 }
968 else { 974 st = white;
969 if (debug_syslog > 1) {
970 char buf[maxlen];
971 char msg[maxlen];
972 snprintf(msg, sizeof(msg), "authenticated id %s (%d recipients, %d limit)", priv.authenticated, c, l);
973 my_syslog(&priv, msg);
974 }
975 st = white;
976 }
977 } 975 }
978 else if (fromvalue == token_black) { 976 else if (fromvalue == token_black) {
979 st = black; 977 st = black;
980 } 978 }
981 else if (fromvalue == token_white) { 979 else if (fromvalue == token_white) {