Skip to Content.
Sympa Menu

devel - [sympa-dev] Re: [sympa-users] How long does sympa cache the results of

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Cc: "address@concealed" <address@concealed>, sympa dev <address@concealed>
  • Subject: [sympa-dev] Re: [sympa-users] How long does sympa cache the results of
  • Date: Wed, 08 Oct 2008 10:56:01 +0200

Hi Chris,

It seems that there is a hard-coded value for the TTL of scenario custom conditions ; this hard-coded value is 3600 seconds.
I think it's too bad this is not customizeable, therefore I can think of two ways to change this :

1. provide a new global/list "custom_conditions_ttl" parameter
2. extend the API of the custom conditions : currently the verify()
subroutine should return a boolean value, but it could return a
boolean + a ttl

(1) is faster to implement, whereas (2) is more flexible.
Please comment on this, Chris.
You're also welcome to add an official feature request : https://sourcesup.cru.fr/tracker/?group_id=23

The related Sympa documentation : http://www.sympa.org/manual/authorization-scenarios#custom_perl_package_conditions

Anyway I move this thread to the sympa-dev mailing list.

Chris Andrews a écrit :
So what is the amount of time that Sympa caches the results of Custom
Conditions?

---
Chris Andrews
Boston College
Collaboration Team
________________________________________
From: Chris Andrews [mailto:address@concealed] Sent: Monday, September 22, 2008 12:35 PM
To: Olivier Salaün
Cc: address@concealed
Subject: RE: [sympa-users] How long does sympa cache the results of

The 2 custom scenarios take care of the SMTP check, because every user here
has 3 to 7 different email aliases I had to write my own custom conditions
to make sure that we took into account all of those other email aliases.

CustomCondition::checkallbcemails([sender],[listname],"subscriber") smtp -> do_it
CustomCondition::checkallbcemails([sender],[listname],"editor") smtp -> do_it

The problem is that Sympa is caching the results of the custom conditions
and reusing those results instead of re-evaluating the custom scenario.

---
Chris Andrews
Boston College
Collaboration Team

-----Original Message-----
From: Olivier Salaün [mailto:address@concealed] Sent: Monday, September 22, 2008 7:38 AM
To: Chris Andrews
Cc: address@concealed
Subject: Re: [sympa-users] How long does sympa cache the results of
conditions?

Hi Chris,

I guess that your scenario failed to accept the subscriber's message
because it is missing the 'smtp' authentication method, along with 'md5'
and 'smime'.
It is required because when a message is sent via the mail interface the
trust only relies on the From: SMTP field.
Your scenario's first line should look like this :

is_subscriber([listname],[sender]) *smtp,*md5,smime -> do_it


Chris Andrews a écrit :
We had a user send a message to a list and it was rejected because the
email address was not a subscriber. They then added the email address
as a subscriber and even ten minutes later the message was still rejected.



Our scenario:



title.gettext Sending and posting privileges are limited to
subscribers all others are forwarded to the owner for moderation.



is_subscriber([listname],[sender]) md5,smime -> do_it

is_editor([listname],[sender]) md5,smime -> do_it

CustomCondition::checkallbcemails([sender],[listname],"subscriber")
smtp -> do_it

CustomCondition::checkallbcemails([sender],[listname],"editor") smtp
-> do_it

is_listmaster([sender]) md5,smime -> do_it

true() smtp,md5,smime ->
reject(reason='send_subscribers_only')



Logs:



[...]

*Sep 17 15:43:28 listserv sympa[27302]: main::DoMessage() Message for
<LIST NAME> from <Sending Address> rejected() because sender not allowed*

Sep 17 15:43:28 listserv sympa[27302]: Moving bad file <LIST
NAME>@listserv.bc.edu.1221680603.18072 to bad/

*Sep 17 15:44:00 listserv wwsympa[6663]: [robot listserv.bc.edu]
[client 136.167.41.130] [address@concealed] [list <LIST NAME>]
main::do_add() do_add(<Sending Address>)*

[...]



  • [sympa-dev] Re: [sympa-users] How long does sympa cache the results of, Olivier Salaün, 10/08/2008

Archive powered by MHonArc 2.6.19+.

Top of Page