[Greylist-users] How do you know when you are ready?

Tom Haapanen tomh at motorsport.com
Wed Feb 25 17:10:43 PST 2004

 >> My question is "why"? So that you don't need to set up MySQL?

>On 2004-02-25 18:45, Franck Arnaud wrote:
>Well, why add an extra layer between the app and the file 
>system when it does not provide any required functionality? 
>(the key feature of mysql for this application is indexed 
>lookups, which reiserfs etc provide -- using the same 
>sort of algorithms databases use). The more complexity 
>there is, the more likely it is to fail or require extra 
>maintenance. You can also use familiar unix tools to 
>view, modify or report the data, without having to 
>learn mysql-specific tools.
Really, the data content of the database is the big reason.  Yes, it's 
possible to do all the reporting on your own, but if you have some 
familiarity with MySQL, it's easy to do ad hoc queries and there is a 
lot of added value to the database.  e.g.

Q: How many mail attempts were blocked yesterday?

select sum(blocked_count) from relaytofrom where date(create_time) = 

Q: Which users get the most mail?

select rcpt_to, sum(passed_count) from relaytofrom where passed_count > 
0 group by rcpt_to;

Q: How much activity has there been each day?

select date(create_time), count(*), sum(blocked_count), 
sum(passed_count) from relaytofrom group by date(create_time);

Q: What servers have been getting through a lot?

select relay_ip, passed_count from relaytofrom where passed_count > 10;

Incidentally, that last query has pinpointed some of the spammers (like 
moosq.com) that actually do retries.

Finally, by having the data in the database will make it easier to 
develop second-level defences by detecting servers that send mail to 
spam traps etc.


More information about the Greylist-users mailing list