[Mailman-Users] running External Archiver on background/foreground

Mohamed CHAARI mohamed.chaari at st.com
Thu Dec 6 10:29:05 CET 2007


Mark Sapiro wrote:
> Mohamed CHAARI wrote:
>> I'm using Mailman for lists management, in a collaboration 
>> infrastructure site.
>> I configured Mailman so that an external archiver is used, but I 
>> hesitate to run this archiver in background or foreground.
>>
>> More concretely, in mm_cfg.py conf file, should I put:
>>
>> PUBLIC_EXTERNAL_ARCHIVER = 'cat > /var/run/mailman/mail_tmp; 
>> /usr/local/bin/external_arch %(listname)s'
>>
>> or
>>
>> PUBLIC_EXTERNAL_ARCHIVER = 'cat > /var/run/mailman/mail_tmp; 
>> /usr/local/bin/external_arch %(listname)s &'
>>
>> What do you recommend ? is there a difference, in terms of performance ?
>> Is there a risk of system overload, for one of the 2 solutions, when 
>> dealing with too big archives ? (I have some archives exceeding 50 M)
> 
> 
> The size of the archive is only going to influence
> /usr/local/bin/external_arch whatever that is. Its performance/run
> time may or may not depend on the size of the archive.
> 
> There are potential issues either way (forground or background). The
> external archiver command is run with the list locked. This is both
> good and bad. It eliminates any potential race condition which might
> overwrite /var/run/mailman/mail_tmp with a second message before the
> first message is processed, at least if only one list is involved, but
> it may keep the list locked for a long time if the external_arch
> process is slow. In addition, if the external_arch shoud do something
> that locks the list, a deadlock results.
> 
> See
> <http://mail.python.org/pipermail/mailman-users/2005-August/045994.html>.
> 

you mentioned, in the thread above (Aug 2005), that it would be better 
to have a unique temporary file, to avoid conflict problems ...
I've tried this, in mm_cfg.py, using unix timestamp

PUBLIC_EXTERNAL_ARCHIVER = 'cat > /var/run/mailman/mail_tmp.$(date +%s); 
/usr/local/bin/external_arch.pl %(listname)s &'

but without success.
is there a way to do it ? should I use Python functions to get unix 
timestamp for current date ?

thanks

-- 
---
--Mohamed CHAARI   (mailto : mohamed.chaari at st.com)



More information about the Mailman-Users mailing list