Re: How to return permanent error for invalid mailbox

2007-09-10 Thread Charlie Brady
On Mon, 10 Sep 2007, Peter J. Holzer wrote: The right solution to this problem has been discussed here previously - I know that it has been discussed several times, but I don't agree this is the right solution. Interesting. the smtp-forward plugin should hook into multiple hooks, and pass

Re: How to return permanent error for invalid mailbox

2007-09-10 Thread Tony L. Svanstrom
On Mon, 10 Sep 2007 the voices made Peter J. Holzer write: > That forces smtp-forward to be the last plugin in the rcpt hook, because > any later plugin could return a 5xx (or worse, a 4xx) error to the > client while the backend has already accepted the recipient. > > Since a large percentage of

Re: How to return permanent error for invalid mailbox

2007-09-10 Thread Tim Tsai
I decided to just put together this hack, which works well for my situation (a very small number of users - my rcptto_patterns file is 66 lines long). Basically it dawned on me that it makes more sense to have a single file combining white/black lists. The plugin just runs through the list an

Re: How to return permanent error for invalid mailbox

2007-09-10 Thread Peter J. Holzer
On 2007-09-09 15:26:29 -0400, Charlie Brady wrote: > On Sun, 9 Sep 2007, Tim Tsai wrote: > >It's silly to keep replying to myself, but here goes. I notice in > >smtp-forward this loop: > > > > for ($transaction->recipients) { > > $smtp->to($_->address) or return (DECLINED, "To: Unable to queue

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Tim Tsai
Thanks Peter & Charlie. I will have to look into doing as you suggested, as I can't seem to find a suitable replacement plugin. Tim On 09/09/2007 2:26 PM, Charlie Brady wrote: On Sun, 9 Sep 2007, Tim Tsai wrote: It's silly to keep replying to myself, but here goes. I notice in smtp-forwa

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Charlie Brady
On Sun, 9 Sep 2007, Tim Tsai wrote: It's silly to keep replying to myself, but here goes. I notice in smtp-forward this loop: for ($transaction->recipients) { $smtp->to($_->address) or return (DECLINED, "To: Unable to queue message ($!)"); } this seems to suggest that if any one reci

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Peter J. Holzer
On 2007-09-09 13:23:36 -0500, Tim Tsai wrote: > It's silly to keep replying to myself, but here goes. I notice in > smtp-forward this loop: > > for ($transaction->recipients) { >$smtp->to($_->address) or return (DECLINED, "To: Unable to queue > message ($!)"); > } > > this seems to sugg

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Tim Tsai
It's silly to keep replying to myself, but here goes. I notice in smtp-forward this loop: for ($transaction->recipients) { $smtp->to($_->address) or return (DECLINED, "To: Unable to queue message ($!)"); } this seems to suggest that if any one recipient fails, the whole transaction fa

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Tim Tsai
I dug around some more and it looks like Net::SMTP actually has a ->status() method from its superclass Net::Cmd and returns the most significant digit. I modified my smtp-forward to look at the ->status() flag and return DENY if it's 5, otherwise return DECLINED. Seems to work well so far.

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread m. allan noah
i have a plugin regex_rcptto which returns any status you want. not as nice as reading it from your actual user list, but it works well for either blocking specific types of addresses (all numbers, etc), or for allowing a small list. I have also found it useful to block in-house mailing lists from

Re: How to return permanent error for invalid mailbox

2007-09-09 Thread Peter J. Holzer
On 2007-09-09 04:57:44 -0500, Tim Tsai wrote: > I have been playing with qpsmtpd in more unusual configurations on > personal domains belonging to myself and some friends. I noticed > recently that one of the domains has been getting 30-40 spams per SECOND > to invalid mailboxes. I am guessing

How to return permanent error for invalid mailbox

2007-09-09 Thread Tim Tsai
I have been playing with qpsmtpd in more unusual configurations on personal domains belonging to myself and some friends. I noticed recently that one of the domains has been getting 30-40 spams per SECOND to invalid mailboxes. I am guessing this is from having run qmail before, where qmail-sm