Sign In | Sign Out | Subscribe to Mailing Lists | Unsubscribe or Change Settings | Help |
smoe.org mailing lists
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = configset listname attachment_rules <<TAG [VALUE LINES] TAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default Value : no default Data Type : attachment_rules Category : moderate Password Notes: Visible only with password. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = EXAMPLE: configset listname attachment_rules << ENDTAG text/plain | allow /.+/ | consult ENDTAG The attachment_rules setting contains a list of rules, which describe what content types of a posted message are considered acceptable. A rule consists of a MIME type (or pattern matching a MIME type) and an action to perform when a message with this type or containing a part of this type passes through the list. Each rule looks something like this: mime/type | action=argument Some common MIME types are text/plain, text/html, and image/jpeg. Possible actions are: allow - Accept the body part. consult - Set the "mime_consult" access variable. By default, this will cause the message to be sent to the list moderators for approval. deny - Set the "mime_deny" access variable. By default, this will cause the entire message to be discarded. require - Set the "mime_require" access variable. By default, this has no effect. See "help configset_access_rules" and "help access_variables" for an explanation of how to use access variables in the access rules. Each message that is posted to a mailing list consists of one or more body parts. Each body part has a particular type, sometimes called a "MIME type," which gives some indication about the contents of the part. For example, a body part containing a WWW document might have a "text/html" MIME type. (MIME is an abbreviation for the name of the Internet standard for giving names to types) Most plain text messages consist of one body part whose type is "text/plain". When a message has more than one body part, the second and succeeding parts are usually called "attachments." The "attachment_rules" setting is somewhat misnamed, because the rules apply to every body part, including the first part. Each attachment rule occupies one line. It is possible to place comments before, between, and after the individual rules, to indicate to other administrators what each rule is intended to accomplish. Comments are lines that begin with a '#'. The first rule that matches a particular body part takes precedence. For example, in the following two rules: text/html | consult /^text/i | deny any message that contains a "text/html" body part will cause the list moderators to be consulted; any message that contains another kind of text body part, for instance "text/plain" or "text/enriched," will cause the message to be denied. Each part of a message body is examined separately. If no rule matches, the part is allowed and not altered. The type on the left-hand side of an access rule can be an exact MIME type, or it can be a pattern that potentially matches many different MIME types (see "help patterns" for an explanation of how to write patterns). For example, to deny all messages containing GIF images, use the following rule: image/gif | deny and to discard all messages containing images of any type, use this rule: /^image/i | deny Exact MIME type matches are case-insensitive; for instance, "image/jpeg" and "Image/JPEG" are considered identical. The allow action ---------------- The allow action causes a body part to be accepted. The consult, deny, and require actions -------------------------------------- If the contents of a message call for both consult and deny actions, by default the deny action will take precedence. By default, the consult action will cause a message to be sent to the moderators of a mailing list for approval, and the deny action will cause a message to be discarded entirely. However, these default actions can be overridden using the access_rules configuration setting. The following access variables will be set by consult and deny actions, and can be used in access rules for the "post" command: $mime_consult - true if any "consult" rule matched a body part $mime_deny - true if any "deny" rule matched a body part $mime - true if either of $mime_consult or $mime_deny is true $mime_require - true if any "require" rule matched a body part The require action is useful for determining if a certain kind of body part is present in a message. For example, the following rule: /^text/i | require would cause the $mime_require variable to be set if at least one text body part (such as text/plain, text/html, or text/enriched) is present in a message. If you wish to prevent messages without a text body part from being posted to a mailing list, you could then use the following rule in the access_rules configuration setting: post deny, reason="Posted messages must have text in their bodies." !$mime_require See "help configset_access_rules" for details on how to use these variables in access rules. Unimplemented features ---------------------- The allow and consult actions take an argument which is intended to be a content-transfer-encoding. Using a different encoding would cause the encoding to be changed. Some valid encodings are "8bit", "base64", "quoted-printable", "x-uuencode" and "x-gzip64". If an argument is not provided, the encoding will be left as is. Due to the nature of MIME, be aware that the encoding can be changed at any machine that the message passes through, so the encoding you choose will not necessarily be the encoding that list members will see (and some may see different encodings than the others). At present, this feature is unimplemented. The "attachment_rules" setting does not alter portions of text messages that contain non-MIME attachments, such as uuencoded documents. See Also: help admin_moderate help configset_access_rules help configset_admin_body help configset_attachment_filters help configset_taboo_body This is the "configset_attachment_rules" help document for Majordomo 2, version 0.1200401130. For a list of all help documents, send the following command: help topics in the body of a message to mj2@smoe.org.
For assistance, please contact the smoe.org administrators.
Sign In | Sign Out | Subscribe to Mailing Lists | Unsubscribe or Change Settings | Help |