Subject: Developers of Sympa
List archive
Re: [sympa-dev] Re: General Informations about Sympe source code to a new developer
- From: Olivier Salaun - CRU <address@concealed>
- To: LEOST Jean-François <address@concealed>
- Cc: address@concealed
- Subject: Re: [sympa-dev] Re: General Informations about Sympe source code to a new developer
- Date: Fri, 06 Dec 2002 17:20:33 +0100
If I understand, you want to allow users to select filters to receive
only part of a mailing list traffis (the one they chose).
Sympa is almost able to meet your needs, let me explain you :
1/ Extending Sympa database structure
First have a look at
http://www.sympa.org/doc/sympa/node8.html#SECTION00860000000000000000
You can extend either user_table or subscriber_table with your 'topics' field.
I guess extending subscriber_table would best suite you,
See http://www.sympa.org/doc/sympa/node6.html#db-additional-subscriber-fields
2/ Using news DB fields in scenarii
Now you have defined your 'topics' field in sympa.conf, you can access it
is scenarii as [subscriber->topics], like this :
match([msg_body], /[subscriber->topics]/) smtp,md5 -> do_it
**BUT** Sympa has no scenario that tells if a message will be sent to a user
(and
it would cost too much CPU, since it would be evaluated for each subscriber).
Therefore, you can't use scenarii for your needs, you should customize
List::distribute_msg() instead.
The feature you request in our development plans but we don't have time right
now.
LEOST Jean-François wrote:
One question to you, not about code design, but about that I can do with
scenarii.
There isn't topics in sympa
I want my user choose topics et receive only message about this topics.
Can I add this functionnality to :
add a field in 'user_table' call 'topics',
add a function in sympa scenarii analyser like
has_this_topics(user_topics_list,topic_searching)
add a scenarii with this instructions :
has_this_topics(subscriber->topics,msg_object) smtp,md5,smime -> do_it()
true() smtp,md5,smime -> reject()
using that with an e-mail object like :
[topic:email_topic] and the other part of the object
Can i do my functionnality like that ?
--
Olivier Salaun
Comite Reseau des Universites
- Re: [sympa-dev] Re: General Informations about Sympe source code to a new developer, Olivier Salaun - CRU, 12/06/2002
Archive powered by MHonArc 2.6.19+.