Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] Configurable Loop Prevention Patch

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Jeff Abbott <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-dev] Configurable Loop Prevention Patch
  • Date: Tue, 21 Mar 2006 12:38:34 +0100

Hi Jeff,

Thank you for this patch that is certainly of interest for other sympa users.
We've integrated it to the development CVS branch (will be part of 5.2 release) :
http://sourcesup.cru.fr/cgi/viewcvs.cgi/sympa/src/Conf.pm?r1=1.133&r2=1.134&makepatch=1&diff_format=u
http://sourcesup.cru.fr/cgi/viewcvs.cgi/sympa/src/List.pm?r1=1.626&r2=1.627&makepatch=1&diff_format=u
http://sourcesup.cru.fr/cgi/viewcvs.cgi/sympa/src/sympa.pl?r1=1.186&r2=1.187&makepatch=1&diff_format=u
We've just changed the following details :
  1. The 'loop_prevention_regex' will look like this : "loop_prevention_regex  mailer-daemon|sympa|listserv|majordomo|smartlist|mailman".
  2. We removed the (...)(\@|$) and also removed the reference to $conf_email variables. It seems reasonable that a site admin should edit this regexp if the name of the sympa robot is customized.
  3. We've added a similar 'loop_prevention_regex' list parameter that should meet your needs without requiring exotic authorization scenarios. The default is the global/robot value.

Jeff Abbott wrote: As I talked about a couple of weeks ago, we plan on using Sympa for  the distributing of messages to admins from several automated  systems, some of which appropriately report themselves as being from  mailer-daemon@host-in-question.  This was causing problems as Sympa  filters several such addresses and drops the messages.  While I like  this behavior for most of our lists -- it prevents the owners from  seeing alarming messages they don't understand and whining at us  about them -- this simply wouldn't work for our "system contact  address" lists as we don't want any mail to be rejected or dropped on  the off chance that it may be useful.

I brought this up a little while back and Serge (I believe it was)  said that pulling the regex into a configuration value would be fine,  so I've worked up a patch to do just that; it's attached.  I tested  it and it applies cleanly to the latest CVS update.  Please let me  know if you need me to do anything like file it in the bug tracker or  whatnot.

This patch adds an additional value added to sympa.conf:   loop_prevention_regex.  It defaults to the old value of:

  ^(mailer-daemon|sympa|listserv|majordomo|smartlist|mailman| $conf_email)(\@|$)

Variables in there will be expanded provided they're available at the  time the regex is examined, which I believe may be limited to  $conf_email and $conf_host.  Messages from addresses matching this  regex will be dropped.  The default behavior shouldn't change  anything for existing sites, and I'm hoping that this will make it  into 5.2.  To accomplish our goal of having most lists not get  messages from these addresses but still allowing some to do so, we've  set our loop_prevention_regex value to "" and are doing the following  in most lists' send scenarios:

  match([sender], /^(mailer-daemon|listserv|majordomo|smartlist| mailman|[conf->email])(\@|$)/) smtp,smime,md5 -> reject,quiet

On the lists where we want to receive those messages then we simply  use a scenario which doesn't include that directive.

Please let me know what you think, or if anyone needs anything else  from me on this.

Thanks,
Jeff





Archive powered by MHonArc 2.6.19+.

Top of Page