On 2007-10-15 00:02:58 +0000, [EMAIL PROTECTED] wrote:
> I am trying to write a plugin that will run a data_post hook several times
> with different sender/receiver pairs, so the message can be
> accepted/rejected independently for each pair:
> 
> Connect
>       mail from
>       rcpt to 1
>       rcpt to 2
>       rcpt to 3
>       data
>               accept 1
>               reject 2
>               accept 3
> Disconnect
> 
> The plugin can use the mail and rcpt hooks to gather the sender and
> recipient information. However, it appears that once you have the message,
> you can only either accept or reject it, once, period.
> 
> Is what I'm asking for possible?

As others have already said, not directly, because SMTP doesn't provide
for that[0]. You can, however, return a temporary error and use the
stored to split recipients at the next delivery attempt. My cf_wrapper
plugin provides a framework for this:

http://www.hjp.at/projekte/qpsmtpd/cf_wrapper/
http://svn.perl.org/viewcvs/qpsmtpd/contrib/hjp/cf_wrapper/

Your plugin could use this framework.

        hp

[0] There's a draft RFC for an extension which I would like to implement
some day, but it won't solve the problem until it is also implemented by
most clients.


-- 
   _  | 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