GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SYMPA (3)

.ds Aq ’

NAME

Sympa - Future base class of Sympa functional objects

CONTENTS

DESCRIPTION

This module aims to be the base class for functional objects of Sympa: Site, Robot, Family and List.

    Functions

Handling the Authentication Token
compute_auth ( context => $that, email => $email, action => $cmd ) Genererate a MD5 checksum using private cookie and parameters.

Parameters:
context => $that Sympa::List, Robot or Site.
email => $email Recipient (the person who asked for the command).
action => $cmd TBD.

Returns:

Authenticaton key.

request_auth ( context => $that, sender => $sender, action => $cmd, [ email => $email ], [ other options... ] ) Sends an authentication request for a requested command.

Parameters:
context => $that Sympa::List, Robot or Site.
sender => $email Recipient (the person who asked for the command)
action => $cmd ’signoff’, ’subscribe’, ’add’, ’del’ or ’remind’ if $that is List. ’global_remind’ else.
email => $email Used if $cmd is add|del|invite|signoff.
gecos => $comment May be used if $cmd is add or subscribe.

Returns:

1 or undef.

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);



Look for a file in the list > robot > site > default locations.

Possible values for options:
order => ’all’
subdir => directory ending each path
lang => language
lang_only => if paths without lang subdirectory would be omitted

Returns full path of target file root/subdir/lang/name or root/subdir/name. root is the location determined by target object $that. subdir and lang are optional. If lang_only option is set, paths without lang subdirectory is omitted.

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)};



make an array of include path for tt2 parsing

IN :
-$that(+) : ref(Sympa::List) | ref(Sympa::Family) | Robot | *
-%options : options

Possible values for 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 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). Find the tt2 file according to $tpl, set up $data for the next parsing (with $context and configuration) Message is signed if the list has a key and a certificate

Note: List::send_global_file() was deprecated.

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 (super or normal) listmaster by parsing listmaster_notification.tt2 template.

Parameters:
$self Sympa::List, Robot or Site.
$operation Notification type.
$param Hashref or arrayref. Values for template parsing.

Returns:

1 or undef.

send_notify_to_user ( $that, $operation, $user, $param ) Send a notice to a user (sender, subscriber or another user) by parsing user_notification.tt2 template.

Parameters:
$that Sympa::List, Robot or Site.
$operation Notification type.
$user E-mail of notified user.
$param Hashref or arrayref. Values for template parsing.

Returns:

1 or 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 best language under the context of List, Robot or Site. Arguments are language codes (see Language) or ones with quality value. If no arguments are given, the value of HTTP_ACCEPT_LANGUAGE environment variable will be used.

Returns language tag or, if negotiation failed, lang of object.

get_supported_languages ( $that ) Function. Gets supported languages, canonicalized. In array context, returns array of supported languages. In scalar context, returns 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: email command address (default, <sympa> address), owner (<sympa-request> address) or listmaster.

List: Returns the list email address of type $type: posting address (default), owner (<LIST-request> address), editor, non-VERP return_path (<LIST-owner> address), subscribe or unsubscribe.

Note: %Conf::Conf or Conf::get_robot_conf() may return <sympa> and <sympa-request> addresses by sympa and request arguments, respectively. They are obsoleted. Use this function instead.

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, returns array of addresses. In scalar context, returns arrayref to them.

is_listmaster ( $that, $who ) Is the user listmaster?
unique_message_id ( $that ) TBD

SEE ALSO

Sympa::Site (not yet available), Sympa::Robot (not yet available), Sympa::Family, Sympa::List.
Search for    or go to Top of page |  Section 3 |  Main Index


6.2.14 SYMPA (3Sympa) 2016-02-26

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.