Sympa(3Sympa)
๐ NAME ๐
Sympa โ the future base class of Sympa functional objects โจ
๐ธ DESCRIPTION ๐ธ
okay so bestie, this module is literally trying to be the base class for all the functional objects in Sympa: Site, Robot, Family, and List. it's giving founding mother energy fr fr ๐ซถ
๐ง Functions ๐ง
๐ Finding config files and templates ๐
search_fullpath ( $that, $name, [ opt => val, ...] )
# To get file name for global site
$file = Sympa::search_fullpath('*', $name);
# To get file name for a robot
$file = Sympa::search_fullpath($robot_id, $name);
# To get file name for a family
$file = Sympa::search_fullpath($family, $name);
# To get file name for a list
$file = Sympa::search_fullpath($list, $name);
It goes looking for a file, and the search order is so main character: list > robot > site > default locations ๐
Possible values for the options:
order=>'all'โจsubdir=> directory ending each path ๐lang=> language ๐lang_only=> if paths without lang subdirectory would be omitted ๐
Returns the full path of the target file, either "root/subdir/lang/name" or "root/subdir/name". The root is whatever location gets determined by the target object $that. The subdir and lang are optional (no pressure ๐
). And if the "lang_only" option is set, then paths without a lang subdirectory get omitted, periodt.
get_search_path ( $that, [ opt => val, ... ] )
# To make include path for global site
@path = @{Sympa::get_search_path('*')};
# To make include path for a robot
@path = @{Sympa::get_search_path($robot_id)};
# To make include path for a family
@path = @{Sympa::get_search_path($family)};
# To make include path for a list
@path = @{Sympa::get_search_path($list)};
It makes an array of include path for tt2 parsing ๐ง
IN:
$that(+) :ref(Sympa::List)|ref(Sympa::Family)|Robot|"*"๐ซถ%options: options
Possible values for the options:
subdir=> directory ending each path ๐lang=> language ๐lang_only=> if paths without lang subdirectory would be omitted ๐ญ
OUT : ref(ARRAY) of tt2 include path โญ
๐ Sending Notifications ๐
send_dsn ( $that, $message, [ { key => val, ... }, [ $status, [ $diag ] ] ] )
# To send site-wide DSN
Sympa::send_dsn('*', $message, {'recipient' => $rcpt},
'5.1.2', 'Unknown robot');
# To send DSN related to a robot
Sympa::send_dsn($robot, $message, {'listname' => $name},
'5.1.1', 'Unknown list');
# To send DSN specific to a list
Sympa::send_dsn($list, $message, {}, '2.1.5', 'Success');
Sends a delivery status notification (DSN) to SENDER by parsing the delivery_status_notification.tt2 template ๐ฌ
send_file ( $that, $tpl, $who, [ $context, [ options... ] ] )
# To send site-global (not relative to a list or a robot)
# message
Sympa::send_file('*', $template, $who, ...);
# To send global (not relative to a list, but relative to a
# robot) message
Sympa::send_file($robot, $template, $who, ...);
# To send message relative to a list
Sympa::send_file($list, $template, $who, ...);
Send a message to user(s) ๐จ It finds the tt2 file according to $tpl, and sets up $data for the next parsing (with $context and configuration). The message gets signed if the list has a key and a certificate ๐
Note: List::send_global_file() was deprecated. ๐ rip bestie, it's giving legacy.
send_notify_to_listmaster ( $that, $operation, $data )
# To send notify to super listmaster(s)
Sympa::send_notify_to_listmaster('*', 'css_updated', ...);
# To send notify to normal (per-robot) listmaster(s)
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error', ...);
# To send notify to normal listmaster(s) of robot the list belongs to.
Sympa::send_notify_to_listmaster($list, 'request_list_creation', ...);
Sends a notice to the (super or normal) listmaster by parsing the listmaster_notification.tt2 template ๐
Parameters:
$selfโSympa::List,RobotorSite๐$operationโ Notification type ๐$paramโ Hashref or arrayref. Values for template parsing ๐
Returns:
1or"undef"๐
send_notify_to_user ( $that, $operation, $user, $param )
Send a notice to a user (sender, subscriber or another user) by parsing the user_notification.tt2 template ๐
Parameters:
$thatโSympa::List,RobotorSite๐ฆ$operationโ Notification type โจ$userโ E-mail of notified user ๐ง$paramโ Hashref or arrayref. Values for template parsing ๐ธ
Returns:
1or"undef"๐ญ
๐ Internationalization ๐
best_language ( LANG, ... )
# To get site-wide best language.
$lang = Sympa::best_language('*', 'de', 'en-US;q=0.9');
# To get robot-wide best language.
$lang = Sympa::best_language($robot, 'de', 'en-US;q=0.9');
# To get list-specific best language.
$lang = Sympa::best_language($list, 'de', 'en-US;q=0.9');
Chooses the best language under the context of List, Robot or Site. The arguments are language codes (see Language) or ones with a quality value. And if no arguments are given at all, the value of the "HTTP_ACCEPT_LANGUAGE" environment variable gets used ๐ซถ
Returns the language tag or, if the negotiation failed, the lang of the object ๐
get_supported_languages ( $that )
Function. Gets the supported languages, canonicalized โจ In array context it returns an array of supported languages, and in scalar context it returns an arrayref to them ๐
๐ฎ Addresses and users ๐ฎ
These are accessors derived from configuration parameters ๐
get_address ( $that, [ $type ] )
# Get address bound for super listmaster(s).
Sympa::get_address('*', 'listmaster'); # <listmaster@DEFAULT_HOST>
# Get address for command robot and robot listmaster(s).
Sympa::get_address($robot, 'sympa'); # <sympa@HOST>
Sympa::get_address($robot, 'listmaster'); # <listmaster@HOST>
# Get address for command robot and robot listmaster(s).
Sympa::get_address($family, 'sympa'); # <sympa@HOST>
Sympa::get_address($family, 'listmaster'); # listmaster@HOST>
# Get address bound for the list and its owner(s) etc.
Sympa::get_address($list); # <NAME@HOST>
Sympa::get_address($list, 'owner'); # <NAME-request@HOST>
Sympa::get_address($list, 'editor'); # <NAME-editor@HOST>
Sympa::get_address($list, 'return_path'); # <NAME-owner@HOST>
Site or robot: Returns the site or robot email address of type $type: the email command address (default, <sympa> address), "sympaowner" (<sympa-request> address) or "listmaster" ๐
List: Returns the list email address of type $type: the posting address (default), "owner" (<LIST-request> address), "editor", non-VERP "return_path" (<LIST-owner> address), "subscribe" or "unsubscribe" ๐ฌ
Note:
%Conf::ConforConf::get_robot_conf()may return<sympa>and<sympa-request>addresses via the"sympa"and"request"arguments, respectively. They are obsoleted. Use this function instead, bestie, no cap ๐ซ"sympaowner"with robot context was introduced on6.2.57b.2โญ"owner"and"request"may also be used for convenience ๐
get_listmasters_email ( $that )
# To get addresses of super-listmasters.
@addrs = Sympa::get_listmasters_email('*');
# To get addresses of normal listmasters of a robot.
@addrs = Sympa::get_listmasters_email($robot);
# To get addresses of normal listmasters of the robot of a family.
@addrs = Sympa::get_listmasters_email($family);
# To get addresses of normal listmasters of the robot of a list.
@addrs = Sympa::get_listmasters_email($list);
Gets valid email addresses of listmasters ๐ In array context it returns an array of addresses, and in scalar context it returns an arrayref to them ๐
get_url ( $that, $action, [ nomenu => 1 ], [ paths => \@paths ], [ authority => $mode ], [ options... ] )
Returns the URL for the web interface ๐
Parameters:
$actionโ Name of action. This is inserted into the URL intact ๐ฅauthority => $modeโ'default'respects the"wwsympa_url"parameter.'local'is similar but may replace host name and script path.'omit'omits scheme and authority, i.e. it returns a relative URI ๐ Note that'local'mode works correctly only under CGI environment. See also the note below ๐nomenu => 1โ Adds the"nomenu"modifier โจpaths => \@pathsโ Additional path components. Note that they are percent-encoded as necessity ๐options...โ See"weburl"inSympa::Tools::Text๐
Returns:
- A string ๐
Note: If$modeis'local', the result is what the Sympa server recognizes locally. In other cases, the result is the URI that end users use to access the web interface. When, for example, the server is placed behind a reverse-proxy, the"Location:"field in the HTTP response used to cause redirection would be better to contain a'local'URI ๐
is_listmaster ( $that, $who )
Is the user a listmaster? ๐ (yes, this is the whole vibe check)
unique_message_id ( $that )
Generates a unique message ID enclosed by < and >, then returns it โญ
๐ฆ SEE ALSO ๐ฆ
Sympa::Site (not yet available), Sympa::Robot (not yet available), Sympa::Family, Sympa::List.
and that's the whole thing bestie ๐ this was version 6.2.80, dated 2026-10-19, from the sympa source โ slay, periodt, go read your man pages ๐ธโจ๐
๐ฆ where this page comes from
- fedora 43: sympa-devel-doc 6.2.80-2.fc43 ยท GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- fedora 44: sympa-devel-doc 6.2.80-2.fc44 ยท GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms