Hi I am not very sound in mailman configuration.
I have a list in which anyone can post. "Hold the positing from non members". Now, I am getting everyday about 100s of spam emails in that list. Please advise how to deal with this? Regards, Vinita Aggarwal -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mohamed CHAARI Sent: Friday, December 07, 2007 1:12 PM To: Mark Sapiro Cc: mailman-users@python.org Subject: Re: [Mailman-Users] running External Archiver on background/foreground Mark Sapiro wrote: > Mohamed CHAARI wrote: > >> Mark Sapiro wrote: >>> 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 ? > > > It looks to me as if you have inherited something from Jean-Philippe GIOLA and > it is now way more complicated than it needs to be. yes > > Here are my observations on the above: > > 1) The name "mail_tmp.$(date +%s)" may still not be unique. What if two > messages arrive to be archived within the same second? > > 2)How does /usr/local/bin/external_arch.pl determine what file to read? And, if > it just picks one, it could be for the wrong list. > > 3)The reason the above doesn't work at all is mailman interpolates into the > PUBLIC_EXTERNAL_ARCHIVER string from a dictionary in order to replace > %(listname)s with the actual listname, but this interpolation sees the %s date > format and replaces it with the entire dictionary. You have to double the % to > avoid this. E.g. > > 'cat > /var/run/mailman/mail_tmp.$(date +%%s); /usr/local/bin/external_arch.pl > %(listname)s &' ok > > 4) The normal way to do this is to not bother with the tempfile stuff at all, > but rather to just pipe the message to the external archiver as in > > PUBLIC_EXTERNAL_ARCHIVER = '/usr/local/bin/external_arch.pl %(listname)s' > > Then external_arch.pl can just read it's standard input for the message. If you > do it this way, you can't run it in the background because it won't get > standard input from the pipe, but the only reason it might need to run in the > background is if it does something which locks the list. which is our case, because of the call to 'arch' > > I think Jean-Philippe GIOLA was doing these wierd contortions because he wanted > both the normal pipermail archive and an external archive, yes this is exactly our requirement > but the normal way > to do this is to just do normal archiving in Mailman and subscribe an address > to the list to do the external archiving. > I didn't understand well this solution. can you please explain it, how can a subscriber/address do the external archiving ? Thank you in advance -- --- --Mohamed CHAARI (mailto : [EMAIL PROTECTED]) ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/vinita.aggarwal%40un.or g.in Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp