[Mailman-Users] Archive merge and search
Mark Sapiro
mark at msapiro.net
Thu Dec 11 19:12:48 CET 2014
On 12/11/2014 01:50 AM, Hal wrote:
>
> $ ps -fAww|grep ArchRunner
> mailman 1368 1346 0 Aug01 ? 00:36:10 /usr/bin/python
> /usr/lib/mailman/bin/qrunner --runner=ArchRunner:0:1 -s
> hal 20027 20009 0 20:32 pts/3 00:00:00 grep ArchRunner
>
> Does this mean it's been running since august 1st this year and it's
> still running as it should?
Yes.
>> Look in Mailman's error log. If you find errors and shunted messages,
>> you can archive the shunted messages by running 'bin/unshunt' after
>> fixing the underlying problem and after removing any unwanted message
>> entries from qfiles/shunt. Run 'bin/show_qfiles qfiles/shunt/*' to see
>> what's there/
>
> $ /usr/lib/mailman/bin/show_qfiles qfiles/shunt/*
> ====================> qfiles/shunt/*
> Traceback (most recent call last):
> File "/usr/lib/mailman/bin/show_qfiles", line 95, in <module>
> main()
> File "/usr/lib/mailman/bin/show_qfiles", line 81, in main
> fp = open(filename)
> IOError: [Errno 2] No such file or directory: 'qfiles/shunt/*'
> $
>
> I'm not sure how to interpret the above though.
You have to point it at Mailman's qfiles/shunt/ directory. Depending on
what packaged Mailman this is, that may be /var/lib/mailman/qfiles/shunt
or /var/spool/mailman/shunt/ or somewhere else.
> I located the /var/log/mailman/ directory which is where I suppose the
> mentioned logs are located?
> There's a whole bunch of files there:
>
> $ ls
> total 144
> -rw-rw-r-- 1 mailman mailman 16289 Dec 10 21:07 bounce
> -rw-rw-r-- 1 mailman mailman 83 Nov 13 23:22 bounce-20141116
> -rw-rw-r-- 1 mailman mailman 249 Nov 20 16:17 bounce-20141123
> -rw-rw-r-- 1 mailman mailman 83 Nov 28 15:55 bounce-20141130
> -rw-rw-r-- 1 mailman mailman 83 Dec 2 11:56 bounce-20141207
That's a lot of recent bounce activity. You might look at that.
> -rw-rw-r-- 1 apache mailman 15801 Dec 10 20:51 error
This is the one we need to see.
...
> I had a look at the most obvious file "error" (with yesterday's date)
> which shows a whole lot of permissions errors:
>
>
> $ more error
> Dec 09 12:58:27 2014 (1368) Archive file access failure:
> /var/lib/mailman/archives/private/my_list_name.mbox/my_list_name.mbox [Errno
> 13] Permission denied:
> '/var/lib/mailman/archives/private/my_list_name.mbox/my_list_name.mbox'
> Dec 09 12:58:27 2014 (1368) Uncaught runner exception: [Errno 13]
> Permission denied: '/var/lib/mailman/archives/private/my_list_name.mbo
> x/my_list_name.mbox'
> Dec 09 12:58:27 2014 (1368) Traceback (most recent call last):
> File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 120, in _oneloop
> self._onefile(msg, msgdata)
> File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 191, in _onefile
> keepqueued = self._dispose(mlist, msg, msgdata)
> File "/usr/lib/mailman/Mailman/Queue/ArchRunner.py", line 73, in _dispose
> mlist.ArchiveMail(msg)
> File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 200, in
> ArchiveMail
> self.__archive_to_mbox(msg)
> File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 169, in
> __archive_to_mbox
> mbox = self.__archive_file(afn)
> File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 157, in
> __archive_file
> return Mailbox.Mailbox(open(afn, 'a+'))
> IOError: [Errno 13] Permission denied:
> '/var/lib/mailman/archives/private/my_list_name.mbox/my_list_name.mbox'
...
> I've obviously messed something up while importing all my MBOX files
> into the archive. Here's what comes up when I go to the archives to see
> the mbox file mentioned in the error log above:
>
> $ cd /var/lib/mailman/archives
> $ ls
> total 8
> drwxr-s--x 6 hal mailman 4096 Nov 19 00:41 private/
> drwxr-sr-x 2 hal mailman 4096 Nov 8 15:39 public/
> $ cd private/
> $ ls
> total 32
> drwxr-sr-x 2 hal mailman 4096 Nov 8 15:39 mailman/
> drwxr-sr-x 2 hal mailman 4096 Nov 8 15:39 mailman.mbox/
> drwxrwsr-x 176 hal mailman 20480 Nov 19 03:27 my_list_name/
> drwxr-sr-x 2 hal mailman 4096 Nov 8 15:39 my_list_name.mbox/
> $ cd my_list_name.mbox/
> $ ls
> total 808
> -rw-r--r-- 1 hal mailman 825894 Nov 8 15:39 my_list_name.mbox
And here's the problem.
sudo chmod g+w
/var/lib/mailman/archives/private/my_list_name.mbox/my_list_name.mbox
will fix it. Then you can run bin/unshunt which will put the shunted
messages in the archive, but as I said before, it's a good idea to first
examine the contents of qfiles/shunt/ to be sure there aren't other
messages there that you don't want requeued.
--
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