Skip to Content.
Sympa Menu

en - Re: [sympa-users] scenarii

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaun <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] scenarii
  • Date: Wed, 07 Aug 2002 10:55:18 +0200

Hi Eric,

> Eric Sandquist wrote:
> Has anyone written a scenarii that uses any of the optional database fields?

Additional data fields can be used in scenarios, as far as they have been
declared
first in sympa.conf). Data fields in 'user_table' are accessed as
[user->your_field],
and field in 'subscriber_table' are accessed as [subscriber->another_one].

> like having an expiration date for either user_table or subscription_table?
>
> I am not quite sure how to do this, since the date would be a greater
> than/less than issue..

Two conditions are available in scenarios : older() and newer().
They can be used with optional database fields. The only usefull variable
that was missing is [current_date] ; we've just added it ti development tree :
http://listes.cru.fr/cgi-bin/cvsweb.cgi/sympa/src/List.pm.diff?r1=1.312&r2=1.313&f=u

You might be able to apply this patch to your running version of Sympa.

Bellow is a new chapter to the documentation with examples.....

10.9 Sample scenario rules

newer([current_date], '[subscriber->date]+2m') smtp,md5,smime ->
do_it
Subscription date is less than 2 month old.

older([current_date], '[subscriber->expiration_date]')
smtp,md5,smime -> do_it

Subscriber's expiration date is over. The subscriber's expiration
date is an additional, site
defined, data field ; it needs to be defined by the listmaster in the
database an declared in
sympa.conf (see 4.10.9, page ). Note that expiration_date database
field should be an
integer (epoch date format) not a complex date format.

--
Olivier Salaün
Comité Réseau des Universités


  • scenarii, Eric Sandquist, 08/06/2002
    • Re: [sympa-users] scenarii, Olivier Salaun, 08/07/2002

Archive powered by MHonArc 2.6.19+.

Top of Page