[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Qmail + greylisting



Thanks Manuel for your help once again!! It almost worked, but I've found
that once an IP is added to greylisting_lists then all mail regardless of
mail_from / rcpt_to is being accepted.

To me it looks like the plugin is checking the greylisting_lists table
BEFORE the greylisting_data table? If this check was the other way around I
bet it would be perfect.

Thanks - Julian.

>-----Original Message-----
>From: Manuel Mausz [mailto:maillists@xxxxxxxxxxxxxx] 
>Sent: 23 November 2007 19:37
>To: qmail@xxxxxxxxxxxxx
>Subject: Re: Qmail + greylisting
>
>Julian Grunnell wrote:
>> Initially we want to care about relay_ip, mail_from & rcpt_to. But 
>> once a mail has been re-sent that matches all three of those 
>- ie. the 
>> exact same mail is sent 5+ mins later, we then want to 
>accept all mail 
>> from that sender IP address for the next 36 days, regardless 
>of either 
>> the mail_from or rcpt_to data.
>
>Try changing
>      sprintf(query,
>        "UPDATE `greylisting_data` "
>        "SET `record_expires` = NOW() + INTERVAL %u DAY, 
>`passed_count` = `passed_count` + 1 "
>        "WHERE `id` = '%s'",
>        record_expire_good, row[0]);
>to
>      sprintf(query,
>        "INSERT INTO `greylisting_lists` "
>        "VALUES (0, "%s", 0, 0, NULL, "0000-00-00 00:00:00", 
>NOW() + INTERVAL %u DAY, NOW(), NOW(), 'automatic whitelist')",
>        relay_ip, record_expire_good);
>in greylisting.c
>
>And alter the cleanup script to clean greylisting_lists too.
>
>/ manuel
>