From: Guy on
Hi,

I've got a number of messages sitting in the deferred queue because the
user's maildir is overquota. Maildrop allows double the user's paid for
quota so if they've used up that much space I'm happy to immediately bounce
messages to the overquota account at that point. I could do this by
installing the VDA patch and doing some funky sql queries to use virtual
(which can bounce on overquota with the patch) when the user has used up the
full maildrop quota and use maildrop when the account is under quota.

That said, I'd like to avoid using the patch as I've been quite happy using
the Ubuntu postfix package up to this point. I was thinking about a script
that checks the queue every few hours and forces overquota deferred messages
to bounce immediately, but I'm not sure if that's possible. Postsuper
doesn't appear to have the capability.
Does anyone know of a way to force the bounce of a deferred message (based
on queueid or perhaps some other more elegant way of achieving this?

Thanks
Guy

--
Don't just do something...sit there!
From: Wietse Venema on
Guy:
> Hi,
>
> I've got a number of messages sitting in the deferred queue because the
> user's maildir is overquota. Maildrop allows double the user's paid for
> quota so if they've used up that much space I'm happy to immediately bounce
> messages to the overquota account at that point. I could do this by
> installing the VDA patch and doing some funky sql queries to use virtual
> (which can bounce on overquota with the patch) when the user has used up the
> full maildrop quota and use maildrop when the account is under quota.
>
> That said, I'd like to avoid using the patch as I've been quite happy using
> the Ubuntu postfix package up to this point. I was thinking about a script
> that checks the queue every few hours and forces overquota deferred messages
> to bounce immediately, but I'm not sure if that's possible. Postsuper
> doesn't appear to have the capability.
> Does anyone know of a way to force the bounce of a deferred message (based
> on queueid or perhaps some other more elegant way of achieving this?

What about the example AWK script in the postsuper manpage?

Wietse

From: Victor Duchovni on
On Fri, Jun 18, 2010 at 08:50:00PM +0100, Guy wrote:

> Hi,
>
> I've got a number of messages sitting in the deferred queue because the
> user's maildir is overquota. Maildrop allows double the user's paid for
> quota so if they've used up that much space I'm happy to immediately bounce
> messages to the overquota account at that point. I could do this by
> installing the VDA patch and doing some funky sql queries to use virtual
> (which can bounce on overquota with the patch) when the user has used up the
> full maildrop quota and use maildrop when the account is under quota.
>
> That said, I'd like to avoid using the patch as I've been quite happy using
> the Ubuntu postfix package up to this point. I was thinking about a script
> that checks the queue every few hours and forces overquota deferred messages
> to bounce immediately, but I'm not sure if that's possible. Postsuper
> doesn't appear to have the capability.
> Does anyone know of a way to force the bounce of a deferred message (based
> on queueid or perhaps some other more elegant way of achieving this?

You can update the transport table with a per-user entry:

user(a)example.com error:5.2.2 Mailbox full

(and then don't forget to delete this when the user goes under quota).

--
Viktor.