Edvin Seferovic wrote:
No, all it does is look in the existing relay-delay table and if the domain is in there, it doesn't do any grey listing at all.

Hello list members,

( me again ;) ) - could someone give me a hint how to change the greylisting
patch so I can "turn off" greylisting for some of my domains ? I have found
the section where the black/white listing is done, but I dont know how to
change the SQL query so the qmail can accept mails to a domain without
greylisting.

Any hints are welcome !


Hi,

I believe domain whitelisting is already part of it.

sprintf(sql, "SELECT id, block_expires > NOW(), block_expires < NOW() FROM relaytofrom WHERE record_expires > NOW() AND mail_from IS NULL AND relay_ip IS NULL AND rcpt_to = '%s'",indomain);

So you just need to add a record in relaytofrom with a block_expires date greater than today (9999-99-99 24:59:59 works well) and mail_from NULL and rcpt_to is the local domain to whitelist.


Example

insert into relaytofrom values (0,NULL,NULL,"example.com","0000-00-00 00:00:00","9999-12-31 23:59:59",0,0,0,"MANUAL",NOW(),NOW());

Change example.com to the domain that doesn't want greylisting at all and voila!

Regards,

Rick

Reply via email to