sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
237 stars 94 forks source link

New scenario send.privateorpublickeyandeditorkey #1860

Open FredMa01 opened 4 days ago

FredMa01 commented 4 days ago

Expected Behavior

To limit SPAM of lists, these 2 scenarios are interesting:

A compilation of these 2 scenarios send.privateoreditorkey and send.privateorpublickey would allow the owner of a list to only have to validate the messages themselves which have already been confirmed...

To this scenario could be added a white list of addresses so that unsubscribed but known users can broadcast without needing to confirm their message.

The send.privateoreditorkey scenario:

title.gettext Private, moderated for non-subscribers
is_subscriber([listname],[sender]) smtp,dkim,md5,smime -> do_it
is_editor([listname],[sender]) smtp,dkim,md5,smime -> do_it
true() smtp,dkim,md5,smime -> editorkey

The send.privateorpublickey scenario:

title.gettext Private, confirmation for non subscribers
true() md5,smime -> do_it
is_subscriber([listname],[sender]) smtp,dkim -> do_it
true() smtp,dkim -> request_auth

So I tried to create this new scenario send.privateorpublickeyandeditorkey but I'm not sure this is the right approach.

title.gettext Private, confirmation for non-subscribers and moderation for non-subscribers
is_subscriber([listname],[sender]) smtp,dkim,md5,smime -> do_it
is_editor([listname],[sender]) smtp,dkim,md5,smime -> do_it
search(whitelist.txt) smtp,dkim,md5,smime -> do_it
true() smtp,dkim -> request_auth
true() smtp,dkim,md5,smime -> editorkey

The search(whitelist.txt) causes an error "error-performing-condition "in 6.2.70...

An idea to make this scenario clean ?

Thanks

FredMa01 commented 3 days ago

The whitelist.txt file was not placed in the search_filters folder The error has disappeared! The scenario seems to be working well. What I don't know is how to allow a list owner to complete this whitelist.txt via the web interface, for example, or via a remote file... I may need to use a plugin of this type: https://github.com/sshipway/sympa-6.2-plugins/tree/master/whitelist-1.2

title.gettext Private, confirmation for non-subscribers and moderation for non-subscribers
#Case where the sender is on the list -> we broadcast the message
is_subscriber([listname],[sender]) smtp,dkim,md5,smime -> do_it
#Case where the sender is the list moderator -> broadcast the message
is_editor([listname],[sender]) smtp,dkim,md5,smime -> do_it
#Case the sender is in the whitelist -> request message moderation
search(whitelist.txt) smtp,dkim,md5,smime -> editorkey
#If the sender is not in the whitelist -> the sender is asked to validate his message
true() smtp,dkim -> request_auth
#Final step -> send message for moderation
true() smtp,dkim,md5,smime -> editorkey