[Mailman-Users] Archiving failure

tim at maths.tcd.ie tim at maths.tcd.ie
Sat Oct 28 16:58:01 CEST 2000

Our mailman system (running under FreeBSD) states (untruly) that every archives is empty,
because -- I think -- it fails to write out the required index.html files.

We get this (repeatedly) in ~mailman/logs/error

Oct 28 15:40:07 2000 (47279) Archive file access failure:
	/local/lib/mailman/archives/private/sf.mbox/sf.mbox (0, 'Error')
Oct 28 15:40:07 2000 (47279) Delivery exception: (0, 'Error')
Oct 28 15:40:07 2000 (47279) Traceback (innermost last):
  File "/local/lib/mailman/Mailman/Handlers/HandlerAPI.py", line 82, in do_pipeline
    func(mlist, msg, msgdata)
  File "/local/lib/mailman/Mailman/Handlers/ToArchive.py", line 47, in process
    mlist.ArchiveMail(msg, msgdata)
  File "/local/lib/mailman/Mailman/Archiver/Archiver.py", line 189, in ArchiveMail
  File "/local/lib/mailman/Mailman/Archiver/Archiver.py", line 160, in __archive_to_mbox
  File "/local/lib/mailman/Mailman/Mailbox.py", line 41, in AppendMessage
    self.fp.seek(-1, 2)
IOError: (0, 'Error')

Looking at ~mailman/Mailman/Mailbox.py the offending line 
seems to be the seek(-1,2) in the following,
which appears to be an (odd) way of testing if the file is empty.

    # msg should be an rfc822 message or a subclass.
    def AppendMessage(self, msg):
	# Check the last character of the file and write a newline if it isn't
	# a newline (but not at the beginning of an empty file.
            self.fp.seek(-1, 2)
        except IOError, e:
            if e.errno <> errno.EINVAL: raise
            # the file must be empty
            if self.fp.read(1) <> '\n':
        # seek to the last char of the mailbox
        self.fp.seek(1, 2)

I don't know anything about python --
maybe appearing in logs/error is not that bad?

Any suggestions of advice gratefully received.

More information about the Mailman-Users mailing list