Subject: The mailing list for listmasters using Sympa
List archive
- From: Alexandre Hannud Abdo <address@concealed>
- To: address@concealed
- Subject: [sympa-users] new option not showing in config
- Date: Mon, 17 Mar 2014 17:01:01 -0300
Ni!
A while back I implemented a pseudonimity option alongside the anonymity option (as discussed before in this mailing list).
It's working great when I just override the anonimity code with it, but if I try to create a proper new option it doesn't show up on the wwsympa menus.
I basically copied the exact setup of anonymity, so I expected it to show up right below that.A while back I implemented a pseudonimity option alongside the anonymity option (as discussed before in this mailing list).
It's working great when I just override the anonimity code with it, but if I try to create a proper new option it doesn't show up on the wwsympa menus.
I'm attaching the patch again (as it had a minor fix since last time).
Also, how does one make a pull request to sympa?
I tried writing to sympa-authors back then but got ignored.
I tried writing to sympa-authors back then but got ignored.
diff -bBruN sympa-6.1.11~dfsg-5/usr/share/sympa/default/edit_list.conf sympa-pseudonymous/usr/share/sympa/default/edit_list.conf
--- sympa-6.1.11~dfsg-5/usr/share/sympa/default/edit_list.conf 2014-01-11 16:43:31.342676079 -0200
+++ sympa-pseudonymous/usr/share/sympa/default/edit_list.conf 2014-01-11 16:48:10.206409353 -0200
@@ -108,6 +108,8 @@
anonymous_sender owner,privileged_owner hidden
+pseudonymous_sender owner,privileged_owner hidden
+
forced_reply_to owner,privileged_owner hidden
custom_header owner,privileged_owner hidden
diff -bBruN sympa-6.1.11~dfsg-5/usr/share/sympa/default/web_tt2/help_editlist.tt2 sympa-pseudonymous/usr/share/sympa/default/web_tt2/help_editlist.tt2
--- sympa-6.1.11~dfsg-5/usr/share/sympa/default/web_tt2/help_editlist.tt2 2014-01-11 16:43:31.354676098 -0200
+++ sympa-pseudonymous/usr/share/sympa/default/web_tt2/help_editlist.tt2 2014-01-13 22:58:46.358999925 -0200
@@ -9,6 +9,8 @@
[%|helploc%]Privilege for adding (ADD command) a subscriber to the list[%END%]
[% ELSIF p.key == 'anonymous_sender' %]
[%|helploc%]To hide the sender's email address before distributing the message. It is replaced by the provided email address.[%END%]
+ [% ELSIF p.key == 'pseudonymous_sender' %]
+ [%|helploc%]To hide the sender's name and email address before distributing the message. It is replaced by the name associated to that email in the sympa database, plus the provided email address.[%END%]
[% ELSIF p.key == 'archive' %]
[%|helploc%]Privilege for reading mail archives and frequency of archiving[%END%]
[% ELSIF p.key == 'available_user_options' %]
diff -bBruN sympa-6.1.11~dfsg-5/usr/share/sympa/lib/List.pm sympa-pseudonymous/usr/share/sympa/lib/List.pm
--- sympa-6.1.11~dfsg-5/usr/share/sympa/lib/List.pm 2014-01-11 16:43:31.310676174 -0200
+++ sympa-pseudonymous/usr/share/sympa/lib/List.pm 2014-03-17 16:55:44.606375720 -0300
@@ -330,6 +330,10 @@
'gettext_id' => "Anonymous sender",
'group' => 'sending'
},
+ 'pseudonymous_sender' => {'format' => '.+',
+ 'gettext_id' => "Pseudonymous sender",
+ 'group' => 'sending'
+ },
'archive' => {'format' => {'period' => {'format' => ['day','week','month','quarter','year'],
'synonym' => {'weekly' => 'week'},
'gettext_id' => "frequency",
@@ -2543,6 +2547,31 @@
## Virer eventuelle signature S/MIME
}
+ ## Substitute the sender if the list is pseudonymized
+ elsif ( $self->{'admin'}{'pseudonymous_sender'} ) {
+
+ my $user = $message->{'sender'};
+ foreach my $field (@{$Conf::Conf{'anonymous_header_fields'}}) {
+ $hdr->delete($field);
+ }
+
+ my $info_user = $self->get_subscriber($user);
+ $hdr->add('From', "$info_user->{'gecos'} <$self->{'admin'}{'pseudonymous_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";
+ }
+
+ ## Virer eventuelle signature S/MIME
+ ##
+ }
+
## Add Custom Subject
if ($self->{'admin'}{'custom_subject'}) {
my $subject_field = $message->{'decoded_subject'};
- [sympa-users] new option not showing in config, Alexandre Hannud Abdo, 03/17/2014
Archive powered by MHonArc 2.6.19+.