Skip to Content.
Sympa Menu

en - RE: [sympa-users] Unsubscribe requests sent directly to list

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: Gordon Chung <address@concealed>, "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] Unsubscribe requests sent directly to list
  • Date: Wed, 24 Sep 2014 21:44:38 +0000

> Just received a question from an owner of a list with a large amount of
> subscribers. He has tried looking for some functionality which exists
within
> Sympa that would be able to bounce/reject unsubscribe email requests sent
> directly to the list instead of to the automatic address@concealed email
address.

I suppose one way to do it would be this...

1. Set up a mail_tt2/try_again.tt2 notification template to tell people they
messed up, something like this:

From: [% fromlist %]
Subject: [% FILTER qencode %]List commands detected in subject line[%END%]

[%|loc(list.name,list.host)%]Your message for list %1@%2 has been rejected
because it
Looks like you sent a command to the list address. Commands should instead
be
sent to the address sympa@%2 for processing.[%END%]
[%|loc(subject)%](Subject of your mail: %1)[%END%]
[%|loc(list.name)%]For more information on list %1 usage:[%END%]
[% conf.wwsympa_url %]/info/[% list.name %]

2. Create a scenari/send.reject_commands custom scenario that matches
against the subject line for one containing something like:

title.gettext Private list, no commands
is_editor([listname],[sender]) smtp,dkim,smime,md5 ->
do_it
is_owner([listname],[sender]) smtp,dkim,smime,md5 ->
do_it
match([msg_header->subject],/^((un)?subscribe)$/) smtp,dkim,smime,md5 ->
reject(tt2='try_again')
is_subscriber([listname],[sender]) smtp,dkim,smime,md5 ->
do_it
true() smtp,dkim,md5,smime ->
reject(reason='send_subscriber')

This will send a reject message to people sending a message to the list with
a subject 'subscribe' or 'unsubscribe'. You need to be very careful with
the regexp that it doesn't get too greedy and block real messages. Extend
it to block more commands, but make sure it is left and right anchored
(^...$) so that it doesn't match other things.

Note this only catches commands in subject lines; to catch commands in the
body is too difficult using a single regexp without an excessive risk of
false positives.

Steve

Steve Shipway
address@concealed


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




Archive powered by MHonArc 2.6.19+.

Top of Page