| 1 | = Project Lancelot Modules = |
|---|
| 2 | |
|---|
| 3 | This is a brief overview of the various processing modules that can be |
|---|
| 4 | used in Project Lancelot workflows. |
|---|
| 5 | |
|---|
| 6 | At this stage, the only workflow that makes sense is the '''submit''' |
|---|
| 7 | workflow, and a suitable definition would be |
|---|
| 8 | {{{ |
|---|
| 9 | mail.workflow.submit = policy_addresses policy_mime list_headers post_message |
|---|
| 10 | }}} |
|---|
| 11 | |
|---|
| 12 | == Module list_headers == |
|---|
| 13 | |
|---|
| 14 | === Description === |
|---|
| 15 | |
|---|
| 16 | This module performs various header manipulations: |
|---|
| 17 | |
|---|
| 18 | * Insertion of RFC2919 and RFC2369 headers |
|---|
| 19 | * Subject-line tagging |
|---|
| 20 | * ''Reply-To:'' munging |
|---|
| 21 | |
|---|
| 22 | === Configuration Parameters === |
|---|
| 23 | |
|---|
| 24 | * '''mail.forcereplyto''' (boolean): If true, and if |
|---|
| 25 | '''mail.replyto''' is set, adds a ''Reply-To:'' header to the |
|---|
| 26 | message using the content of '''mail.replyto'''. Any previous |
|---|
| 27 | ''Reply-To:'' header is overwritten. (''Note:'' The issue of |
|---|
| 28 | whether using this is actually a good idea is highly contentious.) |
|---|
| 29 | (Default: '''false''') |
|---|
| 30 | |
|---|
| 31 | * '''mail.listheaders''' (boolean): If true, RFC2369 headers |
|---|
| 32 | (''List-Post'', ''List-Subscribe'', and friends) will be generated |
|---|
| 33 | for the list. (Default: '''true''') |
|---|
| 34 | |
|---|
| 35 | * '''mail.listid''' (string): If set, this will be used as the ''complete'' |
|---|
| 36 | RFC2919 ''List-ID:'' header, i.e., it should include the angle brackets |
|---|
| 37 | and a comment (if desired). If not set, the ''List-ID:'' header will be |
|---|
| 38 | derived from '''list.address''' by replacing the ''@'' in that |
|---|
| 39 | address by ''.list-id.''. (''Note:'' There is no way of not generating |
|---|
| 40 | a ''List-ID'' header.) (Default: unset) |
|---|
| 41 | |
|---|
| 42 | * '''mail.replyto''' (string): If set, this string will be used as |
|---|
| 43 | the value of a ''Reply-To:'' header if the message does not already |
|---|
| 44 | contain one. (Default: unset) |
|---|
| 45 | |
|---|
| 46 | * '''mail.subjecttag''' (string): If set, this string will be |
|---|
| 47 | inserted at the beginning of a message's ''Subject:'' header if it |
|---|
| 48 | is not already present. (A possibly empty sequence of ''Re:'' tags |
|---|
| 49 | and spaces in front of the subject tag will be ignored, to keep the |
|---|
| 50 | header from growing without bounds.) (Default: unset) |
|---|
| 51 | |
|---|
| 52 | == Module policy_addresses == |
|---|
| 53 | |
|---|
| 54 | === Description === |
|---|
| 55 | |
|---|
| 56 | This module can check whether the list's submission address shows up |
|---|
| 57 | in the current message's ''To:'' or ''Cc:'' headers, and reject the |
|---|
| 58 | message otherwise. |
|---|
| 59 | |
|---|
| 60 | It can also check whether the sender of the current message is a subscriber |
|---|
| 61 | to the list, and set the '''from_subscriber''' flag on the message if |
|---|
| 62 | this is the case. |
|---|
| 63 | |
|---|
| 64 | === Configuration Parameters === |
|---|
| 65 | |
|---|
| 66 | * '''mail.policy.explicitaddress''' (boolean): If true, the list's |
|---|
| 67 | submission address (see '''list.address''') must occur in |
|---|
| 68 | the ''To:'' or ''Cc:'' headers for the message to be considered for |
|---|
| 69 | further processing, otherwise the message is bounced using the |
|---|
| 70 | '''policy-addresses-explicit''' template. (Default: '''true''') |
|---|
| 71 | |
|---|
| 72 | * '''mail.policy.subscribersonly''' (boolean): Determines whether |
|---|
| 73 | message senders should be tested for subscribership. If this is set |
|---|
| 74 | and the message sender is not a subscriber, set the |
|---|
| 75 | '''nonsubscriber''' flag on the message. (Default: '''true''') |
|---|
| 76 | |
|---|
| 77 | == Module policy_mime == |
|---|
| 78 | |
|---|
| 79 | === Description === |
|---|
| 80 | |
|---|
| 81 | This module checks the MIME type of a message and possibly its |
|---|
| 82 | subparts and does the following: |
|---|
| 83 | |
|---|
| 84 | * Messages of content type ''text/plain'' are accepted for further processing. |
|---|
| 85 | * Messages of content type ''multipart/alternative'' are accepted for |
|---|
| 86 | further processing in the following cases: |
|---|
| 87 | * They contain exactly one subpart, which is of type ''text/plain''. |
|---|
| 88 | (This part will be coerced to be the main body before continuing.) |
|---|
| 89 | * They contain exactly two subparts, one of which is of type ''text/plain'' |
|---|
| 90 | and the other is of type ''text/html''. (The ''text/html'' part will |
|---|
| 91 | be removed, and the ''text/plain'' part will be coerced to be the |
|---|
| 92 | main message body.) |
|---|
| 93 | All other ''multipart/alternative'' messages are either dropped (if |
|---|
| 94 | the message contains two subparts or if the sender is not a list |
|---|
| 95 | subscriber) or bounced back to the sender using the '''policy-mime''' |
|---|
| 96 | template. |
|---|
| 97 | * Messages of content type ''multipart/mixed'' are accepted for further |
|---|
| 98 | processing if they contain exactly one subpart and that subpart is |
|---|
| 99 | of type ''text/plain''. (This subpart will be made the main body as |
|---|
| 100 | above.) |
|---|
| 101 | * All other messages are dropped (if the sender is not a list subscriber) |
|---|
| 102 | or bounced back to the sender using the '''policy-mime''' template. |
|---|
| 103 | |
|---|
| 104 | == Module post_message == |
|---|
| 105 | |
|---|
| 106 | === Description === |
|---|
| 107 | |
|---|
| 108 | This module posts the current message to the list subscribers using SMTP to |
|---|
| 109 | a designated server. |
|---|
| 110 | |
|---|
| 111 | It performs the following operations before actually posting the message: |
|---|
| 112 | |
|---|
| 113 | * The message is given a unique message number if it does not already |
|---|
| 114 | have one (e.g., because it was archived). |
|---|
| 115 | * A ''Precedence: bulk'' header is added. |
|---|
| 116 | * An ''X-Software:'' header is added to show off the Project Lancelot |
|---|
| 117 | version number. |
|---|
| 118 | * An ''X-Loop:'' header is added to avoid creating mail loops. |
|---|
| 119 | * Any ''Return-Path:'' and ''Delivered-To:'' headers are removed from |
|---|
| 120 | the message. |
|---|
| 121 | |
|---|
| 122 | === Configuration Parameters === |
|---|
| 123 | |
|---|
| 124 | * '''smtp.debug''' (boolean): If true, the SMTP protocol dialogue will be |
|---|
| 125 | echoed on standard error. This only makes sense when debugging. |
|---|
| 126 | |
|---|
| 127 | * '''smtp.maxrecipients''' (integer): The maximum number of recipient |
|---|
| 128 | addresses passed to the SMTP server during a single SMTP message |
|---|
| 129 | submission. (Default: '''100''') |
|---|
| 130 | |
|---|
| 131 | * '''smtp.port''' (string): The port number used by the SMTP server |
|---|
| 132 | (Default: '''25''') |
|---|
| 133 | |
|---|
| 134 | * '''smtp.server''' (string): The name or IP address of the SMTP server. |
|---|
| 135 | (Default: '''localhost''') |
|---|
| 136 | |
|---|
| 137 | * '''smtp.timeout''' (string): The SMTP timeout (in seconds). (Default: 120) |
|---|