On Thu, 16 Oct 2008 22:09:42 +0100 Steve Kemp <[EMAIL PROTECTED]> wrote:
> On Thu Oct 16, 2008 at 21:55:01 +0100, Steve Kemp wrote: > > > The current qpsmtpd implementation pretty much does: > > > > 1. Reads : RCPT TO <[EMAIL PROTECTED]> from SMTP > > 2. For each rcpt_hook registered call them in turn until > > we get OK/DENY/etc. > > D'oh. Immediately after sending this I see a potential clean > solution. > > I can do the testing in rcpt_pre. This means that any rejections > will show up as 501 errors, but that is a thing I can live with. You can rewrite the given Qpsmtpd::Address-Object like: sub hook_rcpt { my ($self, $transaction) = (shift, shift); $_[0]->user("newuser"); $_[0]->host("new.host.tld"); return DECLINED; } Hanno