On 2007-09-05 14:06:32 -0500, Chris Garrigues wrote:
> I just noticed some entries in my greylist for mail from the outside 
> world destined for domains that aren't mine and thought "Oh oh, am I an open 
> relay?"
> 
> I quickly determined that I'm not, so I thought I'd try to understand why 
> messages which will be denied due to relaying are even touching my greylist.
> 
> After all, check_relay is up near the top of my plugins file.
> 
> So, I determined that all check_relay does is to set the relay_client flag 
> and 
> a test for rcpt_hosts doesn't happen until rcpt_ok (which must be run last).
> 
> Why doesn't rcpt_ok just return(OK) and the logic for testing rcpthosts get 
> moved to check_relay?

Have a look at
http://svn.perl.org/viewcvs/qpsmtpd/contrib/hjp/rcpt_accept/rcpt_accept?view=markup&rev=638

The POD still calls this plugin rcpt_ok, although I had to rename it to
rcpt_accept because some other plugin was named rcpt_ok :-(.

My scheme for handling rcpt request is like this:

* All plugins return DENY (or DENYSOFT) if the mail should *not* be
  accepted for this recipient. Else they return DECLINED.

* The first plugin checks whether the recipient exists and optionally
  sets some notes based on the recipient's preferences. (I use
  aliases_check for this)

* The next plugins do all kinds of anti-spam checks (DNSBLs,
  greylisting, closed mailinglists, ...)

* The last plugin is rcpt_accept, which unconditionally accepts the mail
  for this recipient.

        hp



-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | [EMAIL PROTECTED]         |
__/   | http://www.hjp.at/ |    -- Sam in "Freefall"

Attachment: signature.asc
Description: Digital signature

Reply via email to