Re: discard/delete return code

2003-06-24 Thread Matt Sergeant
On Monday, Jun 23, 2003, at 21:02 Europe/London, Steph L wrote:

Hi,

I've started to use qpsmtpd and I'm attempting to integrate qpsmtpd 
with
amavisd-new (http://www.ijs.si/software/amavisd/). The plugin I'm
attempting to write in some certain circumstances (virus found, 
attachment
not accepted, ...) must be able to discard/delete and stop any 
processing
of the original message (in such cases a policy notification is sent 
back
to the sender later).

Looking at the return codes it seems that currently there is no DISCARD
return code. Is it possible to add such return code in next versions ?
Is it some qmail's limitation ? I'm rather used to postfix/sendmail and
these MTAs offer some DISCARD feature  ?
qpsmtpd is quite strict to the SMTP spec on this - either it delivers 
or it sends a failure return code (4xx or 5xx).

Though honestly I've been thinking of adding something like this 
recently.

Right now you can return DONE from a hook and it will simply not return 
any status code. But I think this will really confuse most mailers 
(though probably spamware won't care much).

Matt.



Re: discard/delete return code

2003-06-24 Thread Matt Sergeant
On Tue, 24 Jun 2003, Matt Sergeant wrote:

 On Tuesday, Jun 24, 2003, at 08:39 Europe/London, Matt Sergeant wrote:

  On Monday, Jun 23, 2003, at 21:02 Europe/London, Steph L wrote:
 
  Looking at the return codes it seems that currently there is no
  DISCARD
  return code. Is it possible to add such return code in next versions ?
  Is it some qmail's limitation ? I'm rather used to postfix/sendmail
  and
  these MTAs offer some DISCARD feature  ?
 
  qpsmtpd is quite strict to the SMTP spec on this - either it delivers
  or it sends a failure return code (4xx or 5xx).
 
  Though honestly I've been thinking of adding something like this
  recently.

 OK, done. If you return DISCARD from a body hook now it will claim
 successful delivery but silently drop the message. I don't like this
 option, but it can actually work in conjunction with (say) a spam
 filter with a quarantine system where the filter automatically
 quarantines the spam, so you need to not run the queue part.

Having committed this I'm thinking very seriously of taking it out
again... I've just had a chat with Ask, and it seems the most sensible way
to implement this is as a queue hook within your plugin. If you want to
discard the email just return OK. If you want it queued the normal way,
return DECLINED.

If you can think of a compelling reason to keep DISCARD in, say now,
otherwise I'll remove it in the next 24 hours.

-- 
!-- Matt --
:-get a SMart net/:-
Spam trap - do not mail: [EMAIL PROTECTED]