Michael Holzt wrote:
One problem remains even after having done that: I still believe that a conf plugin called by an rcpt hook will not be able to
get the recipient in question through the transaction-object because it is not already in it, or is it?

This I can confirm at any rate. All rcpt plugins get called after the client has sent the RCPT TO: line but before qpsmtpd has acknowledged that the rcpt is valid or not. Otherwise what would be the point...


In fact, the rcpt plugins are called after each RCPT TO: line, so each rcpt /could/ have an independent configuration. The problem you are going to have to deal with is the complex relationship between different behaviors when you have multiple recipients for the same message:

1) Matt wants to have all messages scanned with SpamAssassin and messages blocked above a score of 15;

2) John doesn't believe in SpamAssassin any more (he's running dspam), so the message should just get passed in;

3) Michael has a personal blacklist that refuses this message;

4) etc.

You are going to have to build a fairly complicated handler that can keep track of each user's config choices and thread that throughout each and every plugin. It's going to be ugly. It would almost be better to fork the message handling after the rcpt phase and effectively do a single delivery for each rcpt.

John

Reply via email to