next up previous contents index
Next: 11. Virtual robot Up: Sympa Mailing Lists Management Software Previous: 9. Customizing Sympa/WWSympa   Contents   Index

Subsections


10. Mailing list definition

The mailing list creation tool is Sympa's web interface. However, this web feature has only been available from version 2.7 onwards. Users of previous versions will need to create new lists using their favorite text file editor.

This chapter describe how to create a mailing list without using web tools. See 12, page [*] for instructions on the use of WWSympa, which is no doubt the easier method.

The only part of list creation requiring system privileges is the declaration of new system-wide mail aliases. All the other steps should be performed by the sympa user, which will ensure that the files created have the correct access permissions.


10.1 Mail aliases

For each new list, it is necessary to create three mail aliases (the location of the sendmail alias file varies from one system to another).

For example, to create the mylist list, the following aliases must be added:

mylist: "|/home/sympa/bin/queue mylist"
mylist-request: "|/home/sympa/bin/queue mylist-request"
mylist-editor: "|/home/sympa/bin/queue mylist-editor"
mylist-owner: "|/home/sympa/bin/bouncequeue mylist
mylist-subscribe: "|/home/sympa/bin/queue mylist-subscribe"
mylist-unsubscribe: "|/home/sympa/bin/queue mylist-unsubscribe"

The address mylist-request should correspond to the person responsible for managing mylist (the owner). Sympa will forward messages for mylist-request to the owner of mylist, as defined in the ~sympa/expl/mylist/config file. Using this feature means you would not need to modify the alias file if the owner of the list were to change.

Similarly, the address mylist-editor can be used to contact the list editors if any are defined in ~sympa/expl/mylist/config. This address definition is not compulsory.

The address mylist-owner is the address receiving non-delivery reports. The bouncequeue program stores these messages in the queuebounce directory. WWSympa ((see 1.2, page [*]) may then analyze them and provide a web access to them.

The address mylist-subscribe is an address enabling users to subscribe in a manner which can easily be explained to them. Beware: subscribing this way is so straightforward that you may find spammers subscribing to your list by accident.

The address mylist-unsubscribe is the equivalent for unsubscribing. By the way, the easier it is for users to unsubscribe, the easier it will be for you to manage your list!


10.2 List directory

Each list has its own directory whose name defines the list name. We recommend creating it with the same name as the alias. This directory is located in ~sympa/expl (or any other home which you might have defined in the/etc/sympa.conf file).

Here is a list of files/directories you may find in the list directory :

archives/
bye.tpl
config
info
invite.tpl
homepage
message.header
message.footer
reject.tpl
remind.tpl
removed.tpl
stats
subscribers
welcome.tpl
\end {verbatim}
\end {quote}

\section {List configuration file}
    \label {exp-config}


The configuration file for the \mailaddr {\samplelist} list is named
\tildefile {sympa/expl/\samplelist/config}. \Sympa reads it into memory
the first time the list is referred to. This file is not rewritten by 
\Sympa, so you may put comment lines in it. 
It is possible to change this file when the program is running. 
Changes are taken into account the next time the list is
accessed. Be careful to provide read access for \Sympa to this file !

You will find a few configuration files in the \dir {sample} directory. Copy
one of them to \tildefile {sympa/expl/\samplelist/config} and customize it.

List configuration parameters are described in the list creation section, \ref {list-configuration-param}, page~\pageref {list-configuration-param}.

\section {Examples of configuration files}

This first example is for a list open to everyone:

\begin {quote}
\begin{verbatim}
subject First example (an open list)

visibility noconceal

owner
email Pierre.David@prism.uvsq.fr

send public

review public

The second example is for a moderated list with authenticated subscription:

subject Second example (a moderated list)

visibility noconceal

owner
email moi@ici.fr

editor
email big.prof@ailleurs.edu

send editor

subscribe auth

review owner

reply_to_header
value list

cookie 142cleliste

The third example is for a moderated list, with subscription controlled by the owner, and running in digest mode. Subscribers who are in digest mode receive messages on Mondays and Thursdays.

owner
email moi@ici.fr

editor
email prof@ailleurs.edu

send editor

subscribe owner

review owner

reply_to_header
value list

digest 1,4 12:00


10.3 Subscribers file

WARNING: Sympa will not use this file if the list is configured with include or database user_data_source.

The ~sympa/expl/mylist/subscribers file is automatically created and populated. It contains information about list subscribers. It is not advisable to edit this file. Main parameters are:

10.4 Info file

~sympa/expl/mylist/info should contain a detailed text description of the list, to be displayed by the INFO command. It can also be referenced from template files for service messages.

10.5 Homepage file

~sympa/expl/mylist/homepage is the HTML text on the WWSympa info page for the list.


10.6 List template files

These files are used by Sympa as service messages for commands such as SUB, ADD, SIG, DEL, REJECT. These files are interpreted (parsed) by Sympa and respect the template format ; every file has the .tpl extension. See 9.1, page [*].

Sympa looks for these files in the following order :

  1. ~sympa/expl/mylist/<file>.tpl
  2. ~sympa/etc/templates/<file>.tpl.
  3. ~sympa/bin/etc/templates/<file>.tpl.

If the file starts with a From: line, it is taken to be a full message and will be sent (after parsing) without the addition of SMTP headers. Otherwise the file is treated as a text/plain message body.

The following variables may be used in list template files :

-
[conf-$>$email] : sympa e-mail address local part

-
[conf-$>$host] : sympa host name

-
[conf-$>$sympa] : sympa's complete e-mail address

-
[conf-$>$wwsympa_url] : WWSympa root URL

-
[conf-$>$listmaster] : listmaster e-mail addresses

-
[list-$>$name] : list name

-
[list-$>$host] : list hostname

-
[list-$>$lang] : list language

-
[list-$>$subject] : list subject

-
[list-$>$owner] : list owners table hash

-
[user-$>$email] : user e-mail address

-
[user-$>$gecos] : user gecos field (usually his/her name)

-
[user-$>$password] : user password

-
[user-$>$lang] : user language

-
[execution_date] : the date when the scenario is executed

You may also dynamically include a file from a template using the [INCLUDE] directive.

Example:

Dear [user->email],

Welcome to list [list->name.@[list->host].

Presentation of the list :
[INCLUDE 'info']

The owners of [list->name] are :
[FOREACH ow IN list->owner]
   [ow->gecos] <[ow->email]>
[END]

10.6.1 welcome.tpl

Sympa will send a welcome message for every subscription. The welcome message can be customized for each list.

10.6.2 bye.tpl

Sympa will send a farewell message for each SIGNOFF mail command received.

10.6.3 removed.tpl

This message is sent to users who have been deleted (using the DELETE command) from the list by the list owner.

10.6.4 reject.tpl

Sympa will send a reject message to the senders of messages rejected by the list editor. If the editor prefixes her REJECT with the keyword QUIET, the reject message will not be sent.

10.6.5 invite.tpl

This message is sent to users who have been invited (using the INVITE command) to subscribe to a list.

You may use additional variables

-
[requested_by] : e-mail of the person who sent the INVITE command

-
[url] : the mailto: URL to subscribe to the list

10.6.6 remind.tpl

This file contains a message sent to each subscriber when one of the list owners sends the REMIND command (see 17.2, page [*]).

10.6.7 summary.tpl

Template for summaries (reception mode close to digest), see 17.1, page [*].


10.7 Stats file

~sympa/expl/mylist/stats is a text file containing statistics about the list. Data are numerics separated by white space within a single line :


10.8 List model files

These files are used by Sympa to create task files. They are interpreted (parsed) by the task manager and respect the task format. See 9.10, page [*].

10.8.1 remind.annual.task

Every year Sympa will send a message (the template remind.tpl) to all subscribers of the list to remind them their subscription.

10.8.2 expire.annual.task

Every month Sympa will delete subscribers older than one year who haven't answered two warning messages.


10.9 Message header and footer

You may create ~sympa/expl/mylist/message.header and ~sympa/expl/mylist/message.footer files. Their content is added, either at the beginning or at the end of each message before the distribution process.

The footer_type list parameter defines whether to attach the header/footer content as a MIME part (except for multipart/alternative messages), or to append them to the message body (for text/plain messages).

10.9.1 Archive directory

The ~sympa/expl/mylist/archives/ directory contains the archived messages for lists which are archived; see 13.6.1, page [*]. The files are named in accordance with the archiving frequency defined by the archive parameter.


next up previous contents index
Next: 11. Virtual robot Up: Sympa Mailing Lists Management Software Previous: 9. Customizing Sympa/WWSympa   Contents   Index
root 2001-11-16