[Mailman-Users] Rescuing Misdirected Mail from Moderation Queue - possible?
Mark Sapiro
mark at msapiro.net
Mon Feb 3 18:32:01 CET 2014
On 02/03/2014 07:01 AM, Drew Tenenholz wrote:
>
> Is it possible to actually have them sent to the correct list with their original date/time?
There are at least two ways to do this. The messages are in Mailman's
data/ directory as files with names like heldmsg-LIST-nnn.ext where LIST
is the listname, nnn is a sequence number and ext is either 'pck' if
mm_cfg.HOLD_MESSAGES_AS_PICKLES is True (the default) or 'txt' if it is
False.
One way would be to extract the messages from the heldmsg-*.pck files
(or just use them as if they're .txt) and queue them to the correct
list's incoming queue with Mailman's bin/inject command. The tricky part
here is if the heldmsg-* files are pickles, extracting the message
requires a separate step, but something like
for f in `ls data/heldmsg-englishlist-*.pck; do
bin/show_qfiles $f | bin/inject -l frenchlist
rm $f
done
should work, or just
for f in `ls data/heldmsg-englishlist-*.msg; do
bin/inject -l frenchlist $f
rm $f
done
for the .msg case.
Another way is to use the script at
<http://www.msapiro.net/scripts/hold_again>. This requires renaming all
the heldmsg-englishlist-* files to heldmsg-frenchlist-*, while
preserving the extension an then running
/path/to/hold_again -l frenchlist
> So, a couple of questions about this idea:
> 1) If this is a feasible method, with the accepted posts come with their original date/time?
Yes, with either method.
> 2) Will Mailman appropriately strip out the 'Approved:password' line when a message is released from the moderation queue, or will it deliver the message in it's entirety?
The Approved: password will be stripped.
> 3) Do I need to temporarily update the require_explicit_address option in the French list, or will accepting the posts from the moderation queue override that preference?
You will need to turn off require_explicit_destination or add the
english list to acceptable_aliases or the messages will be held by the
french list.
After doing either method, the admindb page for the english list will
show a bunch of "Message with id nnn was lost." messages the first time
it is visited. This is harmless.
--
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