On Mon, Mar 27, 2017 at 06:45:05PM +0000, chaouche yacine wrote:
> Hello,
>
> I am curious to know why do you have 110 000 mails in the mail queue
> to begin with ? are they all deferred mail ? and if so, can you report
> the log line that could contian the reason of the defer ?
>
>
> It happened to me once when I have (mis)configured quotas for my
> users. When a user was over quota, postfix kept retrying again again
> instead of bouncing the mail. The problem is that the user had a filter
> that forwraded the mail to another mailbox, so each delivery attempt
> by postfix was also forwarded to another mailbox and that other mailbox
> eventually got over quota too. In addition, some e-mails were sent from
> a non existing address (a fake address used by scripts or windows apps)
> and the over quota bounce e-mails to those addresses also got deferred
> ! I ended up having 18 000 mails in the active queue and 35000 in
> the deferred queue. And above all, a colleague has flushed the queue,
> making the performances even worse...
>
Use `postsuper` to delete from the mail queue.
On recent Postfix versions, you should this in the manual page `postsuper`
mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "[email protected]" && $9 == "")
print $1 }
' | tr -d '*!' | postsuper -d -
Groeten
Geert Stappers
--
Leven en laten leven