comparison src/context.cpp @ 263:e118fd2c6af0

fix unauthenticated rate limit bug for empty mail from; move unauthenticate rate limit checks after spam filtering
author Carl Byington <carl@five-ten-sg.com>
date Sat, 21 Jul 2012 12:35:19 -0700
parents be939802c64e
children 582cfb9c4031
comparison
equal deleted inserted replaced
262:4648c7a76105 263:e118fd2c6af0
852 return default_rcpt_rate; 852 return default_rcpt_rate;
853 } 853 }
854 854
855 855
856 bool CONTEXT::is_unauthenticated_limited(const char *user) { 856 bool CONTEXT::is_unauthenticated_limited(const char *user) {
857 if (!user) return false;
857 rcpt_rates::iterator i = rcpt_per_hour.find(user); // look for sender user@email limiting 858 rcpt_rates::iterator i = rcpt_per_hour.find(user); // look for sender user@email limiting
858 if (i != rcpt_per_hour.end()) return true; // found user@email limiting 859 if (i != rcpt_per_hour.end()) return true; // found user@email limiting
859 const char *f = strchr(user, '@'); 860 const char *f = strchr(user, '@');
860 i = rcpt_per_hour.find(f); // look for sender @domain limiting 861 i = rcpt_per_hour.find(f); // look for sender @domain limiting
861 return (i != rcpt_per_hour.end()); // found @domain limiting 862 return (i != rcpt_per_hour.end()); // found @domain limiting