Skip to Content.
Sympa Menu

en - RE: [sympa-users] DMARC update?

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] DMARC update?
  • Date: Fri, 11 Apr 2014 04:47:45 +0000

Since our DKIM is handled by the gateway, and not by Sympa, having an original-authentication-results header is not something we can do.

 

I’ve been coding the same thing as Erik in the patch I include below.  Basically, it adds a new config option by splitting anonymous_sender into .mail and .mode, and if mode is ‘from-only’ it attempts to replace the From address with “original from” <anonymous sender>.  I notice Erik’s code is a little more careful to use AddressParser in case the anonymous_sender is not a simple address, as in his case, and does more magic with personal names, if present.  Also, my code does not strip the anonymous headers if in ‘from-only’ mode as we’re not trying to anonymise fully here.

 

Steve

 

Steve Shipway

address@concealed

 

n  Patch for List.pm (sympa 6.1.19)

 

 

334,336c334,337

<           'anonymous_sender' => {'format' => '.+',

<                                  'gettext_id' => "Anonymous sender",

<                                  'group' => 'sending'

---

> # SJS START

>           'anonymous_sender' => { 'format' => { 'mail' => {'format' => '.+',

>                                  'gettext_id' => "email address",

>                                  'order' => 1

337a339,348

>                                  'mode' => { 'format' => [ 'full', 'from-only' ],

>                                  'gettext_id' => "mode",

>                                  'order' => 2

>                                  },

>                               },

>                         'gettext_id' => "Anonymous sender",

>                         'group' => 'sending',

>                     },

> # SJS END

2760a2772

> # SJS START

2762c2774

<     if ( $self->{'admin'}{'anonymous_sender'} ) {

---

>     if ( $self->{'admin'}{'anonymous_sender'}{'mail'} ) {

2764,2777c2776,2794

<       foreach my $field (@{$Conf::Conf{'anonymous_header_fields'}}) {

<           $hdr->delete($field);

<       }

<       $hdr->add('From',"$self->{'admin'}{'anonymous_sender'}");

<       my $new_id = "$self->{'name'}.$sequence\@anonymous";

<       $hdr->add('Message-id',"<$new_id>");

<       # rename msg_topic filename

<       if ($info_msg_topic) {

<           my $queuetopic = &Conf::get_robot_conf($robot, 'queuetopic');

<           my $listname = "$self->{'name'}\@$robot";

<           rename("$queuetopic/$info_msg_topic->{'filename'}","$queuetopic/$listname.$new_id");

<           $info_msg_topic->{'filename'} = "$listname.$new_id";

---

>       if ( $self->{'admin'}{'anonymous_sender'}{'mode'} eq 'from-only' ) {

>           my $newname = $hdr->get('From');

>           $newname =~ s/\s*$//; $newname =~ s/"//g;

>           $hdr->replace('From','"'.$newname.'" <'.$self->{'admin'}{'anonymous_sender'}{'mail'}.'>');

>       } else {

>           foreach my $field (@{$Conf::Conf{'anonymous_header_fields'}}) {

>               $hdr->delete($field);

>           }

>           $hdr->add('From',$self->{'admin'}{'anonymous_sender'}{'mail'});

>           my $new_id = "$self->{'name'}.$sequence\@anonymous";

>           $hdr->add('Message-id',"<$new_id>");

>           # rename msg_topic filename

>           if ($info_msg_topic) {

>               my $queuetopic = &Conf::get_robot_conf($robot, 'queuetopic');

>               my $listname = "$self->{'name'}\@$robot";

>               rename("$queuetopic/$info_msg_topic->{'filename'}","$queuetopic/$listname.$new_id");

>               $info_msg_topic->{'filename'} = "$listname.$new_id";

>           }

2778a2796

> # SJS END

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page