This is the main script; it runs as a daemon and does the message/command processing. It uses these functions: DoFile(), DoMessage(), DoCommand(), DoSendMessage(), DoForward(), SendDigest(), CleanSpool(), sigterm(), sighup().

Concerning reports about message distribution, function List::send_file() (or List::send_global_file()) is called with mail template message_report. Concerning reports about commands, it is the mail template command_report.

Handles a received file: function called by the sympa.pl main loop in order to process files contained in the queue spool. The file is encapsulated in a Message object not to alter it. Then the file is read, the header and the body of the message are separated. Then the adequate function is called whether a command has been received or a message has to be redistributed to a list.

Handles a message sent to <listname>-editor: the list editor, <list>-request: the list owner or the listmaster. The message is forwarded according to $function by calling function mail::mail_forward() (see mail-mail-forward, page ).

This function is called when a signal -TERM is received by sympa.pl. It just changes the value of $signal loop variable in order to stop sympa.pl after endding its message distribution if in progress. (see stop-signals, page )

This function is called when a signal -HUP is received by sympa.pl. It changes the value of $signal loop variable and switchs of the -mail (see stop-signals, page ) logging option and continues current task.