I run some of my domains with a catch-all address (i.e. no recipient
checking), and I have a considerable number of retired addresses there.
Many were never in actual use but have been invented by spammers! With
this setup check_verybadrcptto takes care of about half of my spam,
because a lot of spam includes one of the retired addresses in the
recipient list.
greylisting takes care of much of the remaining spam, but I have to run
it in deny_late mode, so that check_verybadrcptto can do its work (and
issue a hard DENY). In deny_late mode, greylisting defers denials until
hook_data (the documentation says hook_data_post, but this is wrong).
However it still does its database work in hook_mail and/or hook_rcpt,
even though a large number of transactions will receive a DENY before
greylisting ever gets a hook_data call.
It would be nice if the greylisting database work could also be
postponed until hook_data, when it's actually needed ("lazy
evaluation"), so that it can be skipped, if some earlier plugin returns
a DENY.
It would also be nice, if a plugin like check_verybadrcptto could
somehow signal that the transaction is doomed, so that other, more
expensive plugins could tell that they don't need to run anymore. I'm
thinking of something like WILL_DENY and WILL_DENYSOFT that would set a
status code that other plugins could test, and then they could decline
immediately, unless they might return a more severe code.
Hans
- greylisting Inefficiency in deny_late mode Hans Salvisberg
-