At Sun, 07 Jan 2007 09:42:39 -0500,
Guy Hulbert wrote:
> 
> On Sun, 2007-07-01 at 09:22 -0500, Guy Hulbert wrote:
> > On Sun, 2007-07-01 at 14:09 +0100, Joe Knall wrote:
> > > Hello,
> > > 
> > > Postfix has a feature called DISCARD; to discard a message means to 
> > > accept it regularly but deliver to /dev/null (eg. blacklisted senders).
> > > 
> > > To implement this with qpsmtpd do I have to provide a custom hook_queue 
> > > that does actually nothing but return OK?
> > > Am I missing something?
> 
> Apparently not ...
> 
> From: postfix-queue
> 
> =head2 FLAG_DISCARD
> 
> DON'T USE, use another plugin which hooks the I<hook_queue()> and returns
> B<OK> just for the messages you want to drop. As long as this plugin does
> not support setting queue flags on the fly from other modules, this flag
> would drop ALL messages. Don't use!

Those instructions are correct.

Write a plugin that takes the queue hook and if you want to dev/null
it, do it there.

I do something similar on my mailservers - I have other plugins set
transaction flags, and then the first queue plugin writes things to a
file if those flags are set.  Otherwise they get sent to normal
delivery in the next queue plugin.

-R

Reply via email to