On 2006-01-23 22:57:40 -0800, Ask Bjørn Hansen wrote: > On Jan 23, 2006, at 10:27 PM, Dave Rolsky wrote: > > >I'd love to hear what other people are doing for related problems, > >and patches or suggestions are of course welcome. > > For years one of my TODOs have been to implement the "user > information" plugin API I have in my head. > > The essence of it is just a "user" (or whatever) plugin hook that > takes a parameter ([EMAIL PROTECTED]) and returns a simple user object. > (It's a little bit more complicated; it can also return something to > signify a "default user for the domain"). > > A basic recipient check plugin just needs to check if the user hook > returns a user. The spamassassin plugin can get user specific > configuration.
That's mostly what my aliases plugin does. But it mixes the API and the
details how it gets that information (parse a set of text files) too
much. I've been meaning to separate that for some time, too.
> I have done most of it; the block is that to be "complete" qpsmtpd
> needs to be able to split a transaction into multiple messages (one
> per set of options for something) and it needs to be able to generate
> bounces (rather than just rejecting mail). (Use case: mail goes to
> joe@ and doe@ ? Some plugin wants to bounce the one for joe@ but let
> the one for doe@ go through).
I think if some plugin wants to bounce a message (which should be
avoided as much as possible IMNSHO) if should should just do that by
creating the DSN (maybe with a helper class - Qpsmtpd::DSN, anyone) and
feed it to /usr/sbin/sendmail.
I am dealing with the problem that the same mail to different recipients
might be rejected after the rcpt hook in a different way: I return a
temporary error and note which recipients were rejected and which were
accepted (That's oversimplied. I posted a detailed description to this
mailing-list in August, I think). That works well for the one plugin
(majordomo) which uses this mechanism. I still have to deploy this on
wider scale (spamassassin would be a good test case)
hp
--
_ | Peter J. Holzer | Ich sehe nun ein, dass Computer wenig
|_|_) | Sysadmin WSR | geeignet sind, um sich was zu merken.
| | | [EMAIL PROTECTED] |
__/ | http://www.hjp.at/ | -- Holger Lembke in dan-am
pgpr0C9XhY1G6.pgp
Description: PGP signature
