Skip to Content.
Sympa Menu

en - Re: [sympa-users] scenario development

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Thomas Berry <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: Re: [sympa-users] scenario development
  • Date: Sat, 19 Sep 2009 16:21:11 -0700


I've determined that I can do what I want by passing msg_body (or msg_part->body) as the var of the CustomCondition package. Although, after evaluating the contents, I find no message content when passing msg_body and msg_part->body. I now remember having a problem with these "var"s the late time I tried creating a no-attachment filter.

What I want to do is set the message as moderated if the message content is valid. Otherwise, I want to reject the message using a custom tt2 (reject_invalid_url) document.

I created send.url_review and applied it to the list configuration, but it is not working. The messages are posting to the list even though they should be rejected (the test message contains invalid URLs). Messages that are not rejected should be moderated.

send.url_review contents:
title.gettext Moderated with URL Review

is_editor([listname],[sender]) smtp,smime,md5 -> do_it
is_editor([listname],[header->X-sender]) smtp,smime,md5 -> do_it
CustomCondition::url_review([msg_body]) smtp,smime,md5 -> editorkey
true() smtp,smime,md5 -> reject(tt2='reject_invalid_url')


Any suggestions?


Thomas Berry wrote:
Sympa 5.3 (mostly patched to 5.4).

I want to implement a scenario that uses a CustomCondition to analyze
the contents of the submitted message. Is it possible to pass the
filename of the queued message to the CustomCondition package so that
the it can read the file's raw contents?

Thomas Berry
NASA Jet Propulsion Laboratory






Archive powered by MHonArc 2.6.19+.

Top of Page