[Mailman-Users] Need help with a mailman archiving issue

Mark Sapiro msapiro at value.net
Sun Dec 11 19:39:29 CET 2005


Richard Feltham wrote:

>I posted previously about an issue we have been having with the archive
>links.
>Another project came up, and this item got dropped. I now have a bit of time
>to spare, and thought I would try again.


Sorry for the delay. I hope you still have time :-)


>What is happening is this:
>
>When mail comes into a list, it is being dumped into
>/apps/mailman/archives/private/<listname>.mbox/<listname>.mbox
>
>As the mail comes in, it is supposed to generate/update
>/apps/mailman/archives/private/<listname>/<YYYYMMDD>/author.html,
>Date.html, index.html, subject.html, etc
>
>I can do this manually using /apps/mailman/bin/arch <listname>
>That will generate the items properly.


Have you tried doing this (bin/arch) as the mailman user or do you do
it as root or ??


>Mailman version is 2.1.5
>Mailman has been installed as user mailman, using group mailman.
>
>/apps/mailman/Mailman/mm_cfg.py
>ARCHIVE_TO_MBOX = 2
>DEFAULT_ARCHIVE_PRIVATE = 1


Not necessary, as they don't change the defaults, but shouldn't be a
problem.


>/apps/mailman/Mailman/Defaults.py
>ARCHIVE_TO_MBOX = 2
>DEFAULT_ARCHIVE_PRIVATE = 1
>PRIVATE_EXTERNAL_ARCHIVER = No
>PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private')
>
>
>Permissions on the
>/apps/mailan/archives/private directories are:
>drwxrwsr-x   157 mailman mailman  10752 Oct 7 03:30 listname
>drwxrwsr-x     2 mailman mailman    512 Oct 7 03:30 listname.mbox
>
>/apps/mailman/cgi-bin/
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 admin*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 admindb*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 confirm*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 create*
>-rwxr-sr-x   1 mailman  mailman    37364 Oct  8  2004 edithtml*
>-rwxr-sr-x   1 mailman  mailman    36876 Jul  3  2001 handle_opts*
>-rwxr-sr-x   1 mailman  mailman    37364 Oct  8  2004 listinfo*
>lrwxrwxrwx   1 root     mailman        1 Apr  8  2005 mailman -> ./
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 options*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 private*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 rmlist*
>-rwxr-sr-x   1 mailman  mailman    37352 Oct  8  2004 roster*
>-rwxr-sr-x   1 mailman  mailman    37364 Oct  8  2004 subscribe*
>
>
>/apps/mailman/bin/
>-rw-r-----   1 root     mailman    45872 Nov  2  2004 --
>-rwxr-xr-x   1 mailman  mailman     7618 Oct  8  2004 add_members*
>-rwxr-xr-x   1 mailman  mailman     5412 Oct  8  2004 arch*
>-rwxr-xr-x   1 mailman  mailman     2565 Oct  8  2004 b4b5-archfix*
>-rwxr-xr-x   1 mailman  mailman     6136 Oct  8  2004 change_pw*
>-rwxr-xr-x   1 mailman  mailman     4270 Oct  8  2004 check_db*
>-rwxr-xr-x   1 mailman  mailman    12134 Oct  8  2004 check_perms*
>-rwxr-xr-x   1 mailman  mailman     5498 Oct  8  2004 cleanarch*
>-rwxr-xr-x   1 mailman  mailman     6415 Oct  8  2004 clone_member*
>-rwxr-xr-x   1 mailman  mailman    12332 Oct  8  2004 config_list*
>-rwxr-xr-x   1 mailman  mailman     1505 Oct  8  2004 convert.py*
>-rwxr-xr-x   1 mailman  mailman     4474 Jul  3  2001 digest_arch*
>-rwxr-xr-x   1 mailman  mailman     3244 Oct  8  2004 discard*
>-rwxr-xr-x   1 mailman  mailman     4405 Oct  8  2004 dumpdb*
>-rwxr-xr-x   1 mailman  mailman     4957 Oct  8  2004 find_member*
>-rwxr-xr-x   1 mailman  mailman     2639 Oct  8  2004 fix_url.py*
>-rw-r--r--   1 root     mailman     2548 Feb 16  2005 fix_url.pyc
>-rwxr-xr--   1 root     mailman     2377 Sep 29 15:53 fixfooter.py*
>-rw-r--r--   1 root     mailman     2308 Sep 29 16:14 fixfooter.pyc
>-rwxr-xr-x   1 mailman  mailman     3103 Oct  8  2004 genaliases*
>-rwxr-xr-x   1 mailman  mailman     2821 Oct  8  2004 inject*
>-rwxr-xr-x   1 mailman  mailman     2567 Oct  8  2004 list_admins*
>-rwxr-xr-x   1 mailman  mailman     3335 Oct  8  2004 list_lists*
>-rwxr-xr-x   1 mailman  mailman     8322 Oct  8  2004 list_members*
>-rwxr-xr-x   1 mailman  mailman     3171 Oct  8  2004 list_owners*
>-rw-r--r--   1 mailman  mailman      113 Nov 14  2003 listaddr.py
>-rw-r--r--   1 mailman  mailman      393 Nov 14  2003 listaddr.pyc
>-rwxr-x---   1 root     mailman     1885 Nov  2  2004 listcfg*
>-rwxr-xr-x   1 mailman  mailman     1866 Jul  9  2001 listinfo*
>-rwxr-xr-x   1 mailman  mailman    21129 Oct  8  2004 mailmanctl*
>-rwxr-xr-x   1 mailman  mailman     2995 Oct  8  2004 mmsitepass*
>-rwxr-xr-x   1 mailman  mailman     2440 Jul  3  2001 move_list*
>-rwxr-xr-x   1 mailman  mailman     5530 Oct  8  2004 msgfmt.py*
>-rwxr-xr-x   1 mailman  mailman     7133 Oct  8  2004 newlist*
>-rwx------   1 mailman  mailman      752 Nov  5  2001 nightly_arch.sh*
>-rw-r--r--   1 mailman  mailman     2407 Oct  8  2004 paths.py
>-rw-r--r--   1 mailman  mailman      663 Oct  8  2004 paths.pyc
>-rwxr-sr-x   1 mailman  mailman     9202 Oct  8  2004 qrunner*
>-rwxr-xr-x   1 mailman  mailman     2963 Oct  8  2004 rb-archfix*
>-rwxr-xr-x   1 mailman  mailman     4705 Oct  8  2004 remove_members*
>-rwxr-xr-x   1 mailman  mailman     4262 Oct  8  2004 rmlist*
>-rwxr-xr-x   1 mailman  mailman     1352 Oct  8  2004 show_qfiles*
>-rwxr-xr-x   1 mailman  mailman     9670 Oct  8  2004 sync_members*
>-rwxr-xr-x   1 mailman  mailman    12005 Oct  8  2004 transcheck*
>-rwxr-xr-x   1 mailman  mailman     2292 Oct  8  2004 unshunt*
>-rwxr-xr-x   1 mailman  mailman    29654 Oct  8  2004 update*
>-rwxr-xr-x   1 mailman  mailman      969 Oct  8  2004 version*
>-rwxr-xr-x   1 mailman  mailman     8388 Oct  8  2004 withlist*


Permissions seem OK. How do you run bin/mailmanctl to start Mailman?
Normally it is run as root and then it can set the user/group for the
qrunners.

This is the relevant code from Archiver.py

        if mm_cfg.ARCHIVE_TO_MBOX in (1, 2):
            self.__archive_to_mbox(msg)
            if mm_cfg.ARCHIVE_TO_MBOX == 1:
                # Archive to mbox only.
                return
        txt = str(msg)
        # should we use the internal or external archiver?
        private_p = self.archive_private
        if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER and not private_p:
            self.ExternalArchive(mm_cfg.PUBLIC_EXTERNAL_ARCHIVER, txt)
        elif mm_cfg.PRIVATE_EXTERNAL_ARCHIVER and private_p:
            self.ExternalArchive(mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, txt)
        else:
            # use the internal archiver
            f = StringIO(txt)
            import HyperArch
            h = HyperArch.HyperArchive(self)
            h.processUnixMailbox(f)
            h.close()
            f.close()

In your case, the message is archived in the .mbox file and
mm_cfg.ARCHIVE_TO_MBOX is not 1 so we don't return at that point.
(Note that mm_cfg.py imports everything from Defaults.py so any
mm_cfg.X that isn't defined in mm_cfg.py gets its value from
Defaults.py.)

Then, since mm_cfg.*_EXTERNAL_ARCHIVER have their default values of No
(which is false in an if), we fall through the if - elif to the else
where we call the HyperArch.HyperArchive.processUnixMailbox() method
to add the message to the HTML archive. This apparently fails, but it
is the exact same method called by bin/arch to do the archiving, and
it works when bin/arch calls it.

It seems that this must be some kind of permissions or SELinux issue
relating to a difference in the way ArchRunner is run vs. the way
bin/arch is run.

Are there any entries in Mailman's error or qrunner logs from a post to
the list?

-- 
Mark Sapiro <msapiro at value.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