Skip to Content.
Sympa Menu

en - Re: [sympa-users] Allow posts to one list of you're subscribed to another?

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: David Verdin <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] Allow posts to one list of you're subscribed to another?
  • Date: Fri, 9 Oct 2015 10:50:50 +0200



Le 08/10/2015 21:03, John Levine a écrit :
CustomCondition::is_user([sender]) smtp,dkim,md5,smime    -> do_it
true()                             smtp,dkim,md5,smime    -> reject
That's pretty close.  I want to allow people subscribed to list A to
post to list B.  I could do a separate is_user_list_foo() for each
list, but is there a way to pass an argument to a custom routine
like is_user so I can check for a specific list?
Oh, I see, I can pass as many arguments to is_user() as I want, so I
pass the list and robot as arguments, so here's my send.memberorother
scenario, using blah and robotdomain as the list and robot:

title.gettext Subscribers to blah

is_subscriber([listname],[sender]) smtp,dkim,md5,smime    -> do_it
is_editor([listname],[sender])     smtp,dkim,md5,smime    -> do_it
CustomCondition::is_user([sender],'blah','robotdomain') smtp,dkim,md5,smime    -> do_it
true()                             smtp,dkim,md5,smime    -> editorkey

Once I figured it out, that was remarkably easy.  Thanks!
You're welcome. ;)
However, I misunderstood what you wanted: I thought that people subscribed to list A would accept mails from anybody as long as they were subscribed somewhere on the server.

And now that I understand, you should follow Steve's suggestion to use is_subscriber. Indeed, you may not know but you can specify the robot in the list name parameter for is_subscriber. As long as the two robots are on the same server, Sympa can query the database.

So the following line should do:

is_subscriber("address@concealed",[sender])  smtp,dkim,smime,md5  -> do_it


Regards,

David

P.S. : My custom condition is still valid for its purpose: granting authorization to any subscriber on the server. You should modify it to take the robot name into account.



R's,
John

--
A bug in Sympa? Quick! To the bug tracker!

 
David Verdin
Études et projets applicatifs
 
Tél : +33 2 23 23 69 71
Fax : +33 2 23 23 71 21
 
www.renater.fr
RENATER
263 Avenue du Gal Leclerc
35042 Rennes Cedex



PNG image

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page