[Mailman-Users] mailman/sendmail process /var/spool/mail content

Mark Sapiro mark at msapiro.net
Fri Feb 5 12:00:23 EST 2016


On 02/05/2016 07:15 AM, ssn at ebi.ac.uk wrote:
> 
> We had an issue with the mailman server which is now back and running,
> mqueue is empty however /var/spool/mail contains many hundreds of files
> containing an email that was not posted during the period we had an
> issue. Is there way to process these with mailman?


So during some period, the MTA was delivering list mail to mboxes in
/var/spool/mail instead of to Mailman. Is that correct? That's a bit
wierd, but in any case, what is the actual situation now? Are there a
bunch of /var/spool/mail/<listname> files, each of which is a mbox with
all the messages for that list, or are there a bunch of
/var/spool/mail/<listname> maildir directories with individual message
files.

It would be fairly easy to create a script to use Mailman's bin/inject
command to post the messages or post them directly, but it would depend
on how the messages are stored.

I will help with a script, but I would need to know how to find the
messages.

Or if you could arrange to put the messages into some hierarchy like:

x/list1/list1message1
x/list1/list1message2
...
x/list2/list1message1
x/list2/list1message2
...

you could then do something like

for list in `ls x`; do
   for msg in `ls x/$list` ; do
      /path/to/mailman/bin/inject -l $list $list/$msg
   done
done

-- 
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