[Mailman-Users] Why is a Mail stuck in qfiles/bad

Mark Sapiro mark at msapiro.net
Fri Mar 24 15:40:14 EDT 2017

On 03/24/2017 03:53 AM, Markus Bobe wrote:
> The error log says:
> Mar 24 11:11:18 2017 (18258) .bak file max count, preserving file: 1490350277.837968+0696655d510e3bad34fee55513eec06ed9b3413c

In order to not lose messages in the event of a hard server crash, power
outage, etc., when a Mailman runner dequeues a message for processing,
the .pck queue entry is renamed to .bak. Then if Mailman (or the runner)
dies for some reason, the .bak is left behind and when the runner
restarts, it looks for and processes the .bak file.

There is a safety valve built in that keeps track of the number of times
the .bak file is processed and quits after a limit to prevent endlessly
reprocessing a message which kills the runner. This is hard coded in
Mailman/Queue/Switchboard.py as


If a .bak has been processed that many times, it is just saved as a .psv
in qfiles/bad

> and when I do a dumpdb -p:
> [----- start pickle file -----]
> <----- start object 1 ----->
> <----- start object 2 ----->
> {   '_bak_count': 3,
>     '_parsemsg': True,
>     'listname': 'newsletter1',
>     'received_time': 1490350277.837968,
>     'tolist': 1,
>     'version': 3}
> [----- end pickle file -----]
> Can someone tell me the meaning of  ".bak file max count"? I had no success reading the FAQ or searching the mailinglist archive.

So, what keeps getting stuck? If it is a new message each time, look in
Mailman's error and qrunner logs for info as to why.

If as I suspect, this is the same file and you are just moving it from
qfiles/bad/xxx.psv to some qfiles/*/xxx.pck, that won't work becayse the
metadata already has '_bak_count': 3, so it will just be preserved again
without being processed.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list