sympa_scenario man page
sympa_scenario — Authorization scenario An example del.auth file: Basically, a scenario file is composed of titles on the first lines and a set of rules on the following lines. Rules consist of one or more line in the form: Some terms of conditions may take one or more arguments. The arguments are variables or literals (see “Terms of conditions”, “Variables”). Authentication methods is a comma-separated list of one or more methods (see “Authentication methods”). Some actions may have optional modifiers (see “Actions”). Terms of conditions Always returns true. Tests if two arguments are equal. Tests if var is the subscriber, owner or editor of the list listname. listname is the variable Tests if var is the listmaster. Tests if var1 is less than var2. Tests if var matches with perl_regexp. perl_regexp is a perl regular expression. Don't forget to escape special characters ( Note: Sympa prior to 6.2.32 recognized Returns true if first date is posterior to the second Returns true if first date is anterior to the second date date is Unix time or the string "n Tests if var is found by named filter. named_filter_file is a file name ending with Tests if This allows the user to configure their local network to only be accessible to those that are members of it. Evaluates custom condition. package_name is the name of a Perl package in Variables Allows you to introduce custom parameters in your scenario. custom_var_name is the name of the custom parameter you want to use. Date of reception of the message. Mail domain of current list. Note: This variable was introduced by Sympa 6.2.32. Previous versions used a variable env_var is the name of CGI environment variable (note that it is case-sensitive). Set to 1 if the list is neither in To: nor Cc: field. Name of current list. Set to " Value of message header field, available only when evaluating the authorization scenario for sending messages. It can be used, for example, to require editor validation for multipart messages. Optional index may be integer (may be less than The MIME content types and bodies; the body is available for MIME parts in text/xxx format only. Old email when changing subscription email in preference page. The email address of the current user (used on web or mail interface). Default value is “nobody”. Topic of the message. This variable has a value if any of the previous Topic of the message if it has been automatically tagged. Topic of the message if it has been tagged by editor. The message has not got any topic and message topic are required for the list. Topic of the message if it has been tagged by sender. user_attributes_key_word is one of the names of user attributes provided by the SSO system via environment variables. Available only if user authenticated with a Authentication methods The e-mail of authenticated user is given by Default method. No actual authentication, and if any, sender of the message is used. Authenticated by DKIM signature. Authenticated by web authentication (password), or by authentication key in e-mail message. Authenticated by S/MIME signature, or TLS client certificate. Actions An action consists of an action name and optional modifiers. Action names: Allows operation. The message will be forwarded to list editor. The message will be held for moderation by list editor. Same as The operation is held and waits for approval by list owner. Denies operation. The operation is held and waits for confirmation by the user. Modifiers: Only for Note that Only for Sends no notification to the message sender. Only for Only for # Below is the formal syntax definition by modified BNF. rule : condition spaces auth_list “->” action # Condition condition : “!” condition var : “[email]” listname : “[listname]” date : “[date]” user_key_word : “email” subscriber_key_word : “email” list_key_word : “name” conf_key_word : “domain” # Authentication methods auth_list : auth “,” auth_list auth : “smtp” # Actions action : “do_it” ( “,” “quiet” | “,” “notify” )* Path of scenario files: List, robot and site levels, and distribution defaults. Sympa::Scenario. Original contents of this document were partially taken from a chapter “Authorization scenarios” in Sympa, Mailing List Management Software - Reference manual. Sympa::Scenario.3Sympa(3), sympa_toc(1).Synopsis
title deletion performed only by list owners, need authentication
title.es eliminacin reservada slo para el propietario, necesita autentificacin
is_owner([listname],[sender]) smtp -> request_auth
is_listmaster([sender]) smtp -> request_auth
true() md5,smime -> do_it
Description
File format
condition authentication_methods -> action
true ( )
equal (
var1,
var2 )
is_subscriber (
listname,
var )
is_owner (
listname,
var )
is_editor (
listname,
var )
[listname]
or list address, "name“ or ”name@
domain".is_listmaster (
var )
less_than (
var1,
var2 )
match (
var, /
perl_regexp/ )
^
, $
, {
, (
, ...): Check perlre(1) for regular expression syntax. It can contain the string [domain]
(interpreted at run time as the list or robot domain).[host]
instead of [domain]
.newer (
date,
date )
older (
date,
date )
y
nm
nd
nh
nmin
nsec
", where each n is a number.search (
named_filter_file,
var)
.ldap
, .sql
or .txt
.verify_netmask (
network_block )
REMOTE_ADDR
CGI environment variable matches with network_block.CustomCondition::
package_name (
arguments, ... )
$SYSCONFDIR
/custom_conditions/ (lowercase).[custom_vars->
custom_var_name]
[date]
[domain]
[conf->host]
(obsoleted) instead.[env->
env_var]
[is_bcc]
[listname]
[msg_encrypted]
smime
" if the message was S/MIME encrypted.[msg_header->
field_name]
[msg_header->
field_name][
index]
0
) to choose particular entry from multiple fields.[msg_part->type]
[msg_part->body]
[previous_email]
[sender]
[topic]
[topic-*]
variable has a value.[topic-auto]
[topic-editor]
[topic-needed]
[topic-sender]
[user_attributes->
user_attributes_key_word]
generic_sso
.[sender]
variable. If it is not given, 'nobody
' will be set.smtp
dkim
md5
smime
do_it
editor
editorkey
listmaster
do_it
but makes newly created list be pending.owner
reject
request_auth
([email])
request_auth
action. Sends authentication request to the target user of operation (given as the value of "[email]
" variable) instead of original sender.[email]
is a literal and no other variable names can't be used., notify
do_it
and listmaster
actions. Sends a notification to list owner., quiet
(reason='
reason_key')
reject
action. Matches a key in mail_tt2/authorization_reject.tt2 template corresponding to an information message about the reason of the reject of the user. reason_key have to be a static string enclosed by '...'
.(tt2='
tpl_name')
reject
action. Corresponding template (tpl_name.tt2
) is sent to the sender. tpl_name have to be a static string enclosed by '...'
.Formal syntax
| “true” “(” “)”
| “equal” “(” var “,” var “)”
| “is_editor” “(” listname “,” var “)”
| “is_listmaster” “(” var “)”
| “is_owner” “(” listname “,” var “)”
| “is_subscriber” “(” listname “,” var “)”
| “less_than” “(” var “,” var “)”
| “match” “(” var “,” “/” perl_regexp “/” “)”
| “newer” “(” date “,” date “)”
| “older” “(” date “,” date “)”
| “search” “(” named_filter_file “)”
| “verify_netmask” “(” network_block “)”
| “CustomCondition::” package_name “(” var* “)”
| “[conf->” conf_key_word “]”
| “[current_date]”
| “[custom_vars->” custom_var_name “]”
| “[env->” env_var “]”
| “[is_bcc]”
| “[list->” list_key_word “]”
| “[msg_body]”
| “[msg_encrypted]”
| “[msg_header->” field_name “]” “[” index “]”
| “[msg_header->” field_name “]”
| “[msg_part->type]”
| “[msg_part->body]”
| “[previous_email]”
| “[sender]”
| “[subscriber->” subscriber_key_word “]”
| “[topic]”
| “[topic-auto]”
| “[topic-editor]”
| “[topic-needed]”
| “[topic-sender]”
| “[user->” user_key_word “]”
| “[user_attributes->” user_attributes_keyword “]”
| string
| listname_string
| listname_string “@” domain_string
| date_expr
| integer
| “gecos”
| “lang”
| “password”
| “cookie_delay_user”
| additional_user_fields
| “date”
| “bounce”
| “gecos”
| “reception”
| “update_date”
| “visibility”
| additional_subscriber_fields
| “address”
| “domain”
| “lang”
| “max_size”
| “priority”
| “reply_to”
| “status”
| “subject”
| “total”
| “account”
| “default_list_priority”
| “email”
| “lang”
| “listmaster”
| “max_size”
| “request_priority”
| “sympa_priority”
| auth
| ""
| “dkim”
| “md5”
| “smime”
| “editor” [ “,” “quiet” ]
| “editorkey” [ “,” “quiet” ]
| “listmaster” [ “,” “notify” ]
| “owner” [ “,” “quiet” ]
| “reject” (
“(” “reason=” reason_key “)”
| “(” “tt2=” tpl_name “)”
| “,” “quiet”
)*
| “reject(tt2=” tpl_name “)” [ “,” “quiet” ]
| “request_auth” [ “([email])” ]Files
$EXPLDIR/
list path/scenari
$SYSCONFDIR/
virtual host/scenari
$SYSCONFDIR/scenari
$DEFAULTDIR/scenari
See Also
History
Referenced By