SYMPA_SCENARIO(5) | sympa 6.2.70 | SYMPA_SCENARIO(5) |
sympa_scenario - Authorization scenario
An example del.auth file:
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
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:
condition authentication_methods -> action
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
perl_regexp is a perl regular expression. Don't forget to escape special characters ("^", "$", "{", "(", ...): Check perlre(1) for regular expression syntax. It can contain the string "[domain]" (interpreted at run time as the list or robot domain).
Note: Sympa prior to 6.2.32 recognized "[host]" instead of "[domain]".
date is Unix time or the string "n"y"n"m"n"d"n"h"n"min"n"sec"", where each n is a number.
named_filter_file is a file name ending with ".ldap", ".sql" or ".txt".
This allows the user to configure their local network to only be accessible to those that are members of it.
Variables
Note: This variable was introduced by Sympa 6.2.32. Previous versions used a variable "[conf->host]" (obsoleted) instead.
Authentication methods
The e-mail of authenticated user is given by "[sender]" variable. If it is not given, '"nobody"' will be set.
Actions
An action consists of an action name and optional modifiers.
Action names:
Modifiers:
Note that "[email]" is a literal and no other variable names can't be used.
# Below is the formal syntax definition by modified BNF.
rule : condition spaces auth_list "->" action
# Condition
condition : "!" condition
| "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*
")"
var : "[email]"
| "[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 : "[listname]"
| listname_string
| listname_string "@" domain_string
date : "[date]"
| date_expr
| integer
user_key_word : "email"
| "gecos"
| "lang"
| "password"
| "cookie_delay_user"
| additional_user_fields
subscriber_key_word : "email"
| "date"
| "bounce"
| "gecos"
| "reception"
| "update_date"
| "visibility"
| additional_subscriber_fields
list_key_word : "name"
| "address"
| "domain"
| "lang"
| "max_size"
| "priority"
| "reply_to"
| "status"
| "subject"
| "total"
| "account"
conf_key_word : "domain"
| "default_list_priority"
| "email"
| "lang"
| "listmaster"
| "max_size"
| "request_priority"
| "sympa_priority"
# Authentication methods
auth_list : auth "," auth_list
| auth
| ""
auth : "smtp"
| "dkim"
| "md5"
| "smime"
# Actions
action : "do_it" ( "," "quiet" |
"," "notify" )*
| "editor" [ "," "quiet" ]
| "editorkey" [ "," "quiet" ]
| "listmaster" [ "," "notify" ]
| "owner" [ "," "quiet" ]
| "reject" (
"(" "reason=" reason_key ")"
| "(" "tt2=" tpl_name ")"
| "," "quiet"
)*
| "reject(tt2=" tpl_name ")" [ ","
"quiet" ]
| "request_auth" [ "([email])" ]
Sympa::Scenario.
Original contents of this document were partially taken from a chapter "Authorization scenarios" in Sympa, Mailing List Management Software - Reference manual.
2023-01-26 | 6.2.70 |