Topic: Submissions

Mailing lists exist to distribute submissions to them.  When listmanager
receives a submission to a list, a variety of checks are done to the
submission to determine how to handle it.  These are the checks, in the
order in which they are performed.

1.  If a list has the "loop-detect" flag set, submissions to it go out with
    an "X-Loop-Detect" header in it which identifies which listmanager server
    sent out the message originally.  If listmanager detects that the header
    already exists on the submission with a value that suggests that it has
    already processed this message, the submission is silently discarded.

2.  Listmanager has a list of e-mail addresses it is supposed to ignore.
    If the sender's e-mail address is on that list, the submission is silently
    discarded.  This list is controlled by the system administrator.

3.  Listmanager checks to see if the list has been recently deleted (e.g. since
    the last rebuild of the mail "aliases" file).  If so, it rejects the
    message and sends the list submission back to whoever sent it in.

4.  Listmanager attempts to open and lock the database representing the
    corresponding list.  If it fails, the message is deferred until later.

5.  Listmanager checks the ACL for the list.  If an ACL is set and the ACL
    contains an entry which blocks the sender from accessing the list, the
    message is rejected and the sender is notified.

6.  Listmanager samples the message to see if it's empty or not.  If it is,
    the message is rejected and the sender is notified.

7.  Listmanager checks to see if the list requires a password.  If it does,
    it checks to see if the first line of the message contains

    authorization <password>

    If it requires a password and this line is not present, listmanager
    treats the submission from here on as if it were sent to a moderated list.

8.  If the "filter" flag is set and the first word of this submission is
    "unsubscribe", listmanager rejects the submission and notifies the sender
    that she/he should probably have sent that message to
    listmanager@hookup.net.

9.  If the "private" flag is set and the sender is not already a list
    subscriber, the message is rejected and the sender is notified that only
    list subscribers may submit to the list.

10. If the sender is subscribed to the list and has the "silent" flag
    set, listmanager rejects the message and notifies him/her that he/she
    is not permitted to send anything to that list.

11. If the sender is subscribed to the list but is marked as "pending",
    listmanager rejects the message and notifies him/her that he/she may not
    submit to the list until his/her subscription request has been approved.

12. If the sender is subscribed to the list but is marked as "banned",
    listmanager rejects the message and notifies him/her that he/she
    is not permitted to send anything to that list.

13. If the list has the "moderated" flag set and the sender is not a list
    owner (the "owner" member flag) or is not otherwise empowered to send
    submissions to the list (the "submit" member flag), the submission is
    forwarded to the list's moderators (owners).

14. If all of these tests passed, listmanager sends the submission to the
    list at large.  Moreover, if archiving or digesting are set, on-disk
    copies are made for use in archives and digests of the list as appropriate.
