[Mailman-Users] arch + EXTERNAL_ARCHIVER + lock files

Mark Sapiro msapiro at value.net
Mon Aug 1 01:22:54 CEST 2005

Jean-Philippe GIOLA wrote:
>In my mm_cfg.py, Y have this line :
> PUBLIC_EXTERNAL_ARCHIVER = 'cat > /tmp/mail_tmp ; 
>/home/mailman/bin/arch %(listname)s /tmp/mail_tmp'
>So, when a mail is sent to a list, it is store in a temporary file and 
>then this command is execute :
>/home/mailman/bin/arch %(listname)s /tmp/mail_tmp
>The problem I have is that the execution of this last command create 
>lock's files in the locks directory :
>listname.lock ...
>and so arch can't re-create the archives from /tmp/mail_tmp.
>then, when I remove the lock files, the execution of the arch script go on.
>Does someone has a idea to resolve my problem ?

ArchRunner locks the list prior to calling the ArchiveMail() method.
Thus the list is locked when the external archiver is invoked. Thus,
if the external archiver needs to lock the list, it needs to run in
the background so the external archiver command can return and the
list can be unlocked.

Try something like

'cat >/tmp/mail_tmp;/home/mailman/bin/arch %(listname)s /tmp/mail_tmp &'

for the external archiver. Note however that this could result in a
race condition if two posts arrive close enough together, the second
instance of 'cat' could be overwriting /tmp/mail_tmp before the first
instance of 'arch' is done reading it. It is better to create a unique

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