On 2005-08-18 17:30:02 +1000, Gavin Carr wrote: > On Thu, Aug 18, 2005 at 11:44:06AM +1000, Gavin Carr wrote: > > Just wondering if anyone has written a Reverse SRS plugin? I think this > > would just be a recipient plugin that rewrites SRS recipient addresses > > early during RCPT? (before rcpt checks, specifically) > > Replying to self - nope, that won't work. SRS rewriting has to be done > _after_ rcpt_ok, of course, because our local domain is probably only > on the un-rewritten recipient. But it really should still be at RCPT > time because we need to be able to deny individual recipients where the > rewrite fails.
My "aliases" plugin hooks into both rcpt and and data_post for similar
reasons: In the rcpt hook it checks if the rcpt is ok and stores the
expansion (if any) of the alias in a note. In the data_post hook the
recipients are replaced.
Actually, I recently split the plugin into two parts for greater
flexibility: You may want to use the aliases_rewrite part which hooks
into data_post. (I'll post that in a separate message)
> So we need to be able to override the OK from rcpt_ok. Eeek - looks
> like a job for Robert's plugin inheritance magic ...
I use a simple plugin with the name "rcpt_accept" (it used to be called
rcpt_ok[1], but somehow it never got into the official repository, and then
some other plugin got the name) which just returns OK in the rcpt hook
at the very end. The other plugins return DENY(SOFT) or DECLINED.
Normally, I am of the "deny all that isn't accepted" persuasion, but
with qpsmtpd I find that "allow all that isn't denied" works better.
hp
[1] http://www.nntp.perl.org/group/perl.qpsmtpd/604
--
_ | 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
pgpIFbTk9L7RU.pgp
Description: PGP signature
