arch + EXTERNAL_ARCHIVER + lock files
![](https://secure.gravatar.com/avatar/30040f928d1800eb93767beaa99e33ac.jpg?s=120&d=mm&r=g)
Hi all
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 ?
NB : When I execute "/home/mailman/bin/arch listname /tmp/mail_tmp" directly from the command line, it works very well...
-- Cordialement, Jean-Philippe Giola - 6577
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Jean-Philippe GIOLA wrote:
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 name.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Jean-Philippe GIOLA wrote:
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 name.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Jean-Philippe GIOLA
-
Mark Sapiro