|Sign In||Sign Out||Mailing Lists||Unsubscribe or Change Settings||Help|
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = configset GLOBAL admin_body <<TAG [VALUE LINES] TAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - configset listname admin_body <<TAG [VALUE LINES] TAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default Value : /\bcancel\b/i ... (only first item is shown) Data Type : taboo_body Category : moderate Password Notes: Visible only with password. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = EXAMPLE: configset GLOBAL admin_body << ENDTAG /subscribe/ /^set\b/i 1,1,body /X-Loop: / 0,1,xloop ENDTAG If any line of the body of a posted message matches one of these patterns, the message will be sent to the list moderators for review. The following information also applies to the taboo_body setting; just substitute the prefix "taboo_" wherever you see "admin_". By default, patterns in the admin_body setting are checked against the first 10 lines of the message body, whereas patterns in the taboo_body setting are checked against the whole body. The following information also applies to the "admin_headers" and "taboo_headers" settings, but the "nn" line number limit is not supported for these settings. For every message that is posted to a mailing list, the message is compared to both the list's admin_body patterns and the GLOBAL admin_body patterns. All of the patterns are used for comparisons, regardless of the number of matches. When a match is found, the value of an access variable corresponding to that match is changed. By default, the name of the access variable is the same as the name of the configuration setting. For example, a match against a pattern in the list's "admin_body" setting would increase the value of the "admin_body" access variable. See "help configset_access_rules" and "help access_variables" for an explanation of how to use access variables. Access variable names for GLOBAL patterns have a "global_" prefix. For example, when a message matches a pattern in the GLOBAL "admin_headers" setting, the value "global_admin_headers" access variable will be changed. Pattern Syntax Complete syntax of an admin_headers line: !pp ss,vv Complete syntax of an admin_body line: !pp nn,ss,vv where pp - is a Majordomo pattern (see "help patterns" for details) ! - is an optional invert flag (to look for missing lines) nn - is an optional number of lines to check (or 0 to check the whole body) ss - is an optional severity score for use in access_rules vv - is an optional variable name for use in access_rules and the space in "pp nn" is required unless "nn" is not specified, and the commas in "nn,ss,vv" are required if "ss" or "vv" are specified, and "ss" cannot be specified without specifying "nn" and "vv" cannot be specified without specifying "ss" An example may help explain the syntax: !/(nasty|word)/ 10,20,naughty || | | | | | || | | | | "vv" - variable match name || | | | | |+-----|-------+ | "ss" - match severity/score | | | | | | | "nn" - number of lines to match | | | | | pattern delimiters (start and end of "pp") | | | pattern appropriate for the delimiters (middle of "pp") | invert flag (immediately before pattern, if used) ! = invert flag: if not used, success is when the pattern does match within "nn" lines (i.e. the pattern is disallowed in every message) if present, success is when the pattern does NOT match in "nn" lines (i.e. the pattern is required in every message) pp = pattern: see "help patterns" for details a normal Majordomo pattern of the type indicated by the delimiters used ('/' Perl regexp with auto-escaped @, '%' csh/dos, '"' exact substring) nn = number of lines to examine: if used, only the first "nn" lines of the message will be compared. - '0' causes checking of entire message instead of just a few lines - negative values are nonsense and not allowed - defaults to '0' for taboo_body matches and '10' for admin_body if not used, you cannot specify a score or a variable match name ss = match severity/score: if used, a number (possibly negative) indicating the score to add to the appropriate access variable when a match occurs - the total score of a message can be checked in access_rules - the default score is '10' if not used, you cannot specify a variable match name vv = variable match name the name of the access variable that is changed by a match - defaults to 'body' for admin_body and taboo_body - defaults to 'headers' for admin_headers and taboo_headers - the "admin_" or "taboo_" prefix will be added to it automatically. Variable names with all capital letters will not cause a message to be moderated by default when the variable has a nonzero score. What Happens When a Match is Found When you use lower case match variable names, the default action when a message matches an "admin_body" line is for the post to be sent to the list moderators for confirmation. The confirmation message will show both the pattern that matched and the text that it matched. This will occur if the sum of the scores is non-zero (positive or negative). If you use a "vv" variable name in all capitals, the score is kept for that pattern, but by default the message will not be moderated if the score is not zero. You can then write access rules that make use of that access variable, if you wish. The final score for a variable is the sum of all the "ss" values for all of the "vv" variables which had matching rules. This gets a bit tricky, because lines are checked one at a time. You can have several rules match on the same line, but each rule can match only once per line. For example, if a message contains only these two lines: a b c c d d e f then the admin_body pattern "/a/" will match once and increment "vv" by the amount of "ss" just once. On the other hand, the pattern "/c/" will increment "vv" twice since it matches a portion of two lines. Finally, the pattern "/d/" will increment "vv" only once because it matches only one line, regardless of how often the pattern appears on that line. The key is how many lines match the pattern, where the pattern is taken as a whole and the line is taken as a whole. The pattern "/[a-z] [a-z]/" will increment "ss" twice (once per line) as will the pattern "/(c|d)/". The following access variables will always be defined: $global_admin_body $global_admin_headers $global_taboo_body $global_taboo_headers $admin_body $admin_headers $taboo_body $taboo_headers $admin $taboo The values of the first four variables are determined by the patterns in the admin_body and related configuration settings for the GLOBAL pseudo-list. The values of the next four variables are determined by an individual mailing list's settings. The "admin" value is equal to the sum of the other four "admin" variables, plus the scores of any other customized "admin" variables whose names are not all capital letters. Similarly, the "taboo" value is the sum of all "taboo" variables excepting those whose names are all capitals. It is possible to disable all of the admin_body and admin_headers checks by turning off the administrivia setting. See "help configset_administrivia" for more information. It is possible to disable the GLOBAL checks using the access rules. For example, the following access rule will unset the taboo access variable if the GLOBAL taboo_headers setting provides the only taboo matches: post unset=taboo $taboo == $global_taboo_headers See "help configset_access_rules" for more information. Examples Assume in the following examples that your mailing list has the following three "admin_body" patterns: /subscribe/i /(nasty|dirty)/ 10,2,naughty /ugly/ 0,3,naughty The first pattern does not have a special variable name, so each line that it matches would cause the "admin_body" access variable to increase by 10. The second pattern will cause the "admin_naughty" variable to increase by 2 for each line that it matches. Only the first 10 lines of the message will be compared to this pattern. A message which contains the word "subscribe" anywhere in the body, but none of "nasty", "dirty", or "ugly" will have the following access variable values: $admin_body = 10 $admin_naughty = 0 If the message contains the word "subscribe" and either the word "nasty" or the word "dirty" on or before the 10th line, the following values will result: $admin_body = 10 $admin_naughty = 2 If the same message contains both the word "nasty" and the word "dirty" on the same line, the access variable values will be $admin_body = 10 $admin_naughty = 2 because the "nasty" and "dirty" matches are part of the same pattern. If you had two rules instead, /dirty/ 10,2,naughty /nasty/ 10,2,naughty then the "admin_naughty" score would be 4 in this case. If a message contains both "nasty" and "ugly" once in the first 10 lines, the access variable values would be $admin_body = 0 $admin_naughty = 5 The "nasty" match adds 2 to the score, and the "ugly" match adds 3. If a message contains both "nasty" and "ugly" on line 20 $admin_naughty == 3 because "ugly" is matched anywhere in the message but "nasty" is only matched in the first 10 lines. To repeat, the access variables for pattern matches have numeric values, containing a total score for all the body or header lines which matched, or zero if no lines matched. Eight variables are always defined, but will have zero values unless there are matching admin_body or admin_headers patterns that do not have a specified variable match name. Matching Encoded Data Using taboo_body or admin_body to look for the "begin" tag of uuencoded data may fail, if there is a content-type header, because may be is seen as part of MIME encoding. In this case, the word "begin" will not appear in the message body that Majordomo's core routines process. Please refer to "help configset_attachment_rules" for how to trap MIME attachments. For uuencoded attachments, "begin 644" or something similar does appear in the raw stream of bytes that traverse the network and show up in your mailbox file. The MIME interface Majordomo uses is smart enough to decode an attachment with Content-Transfer-Encoding: x-uuencode just like it will decode quoted-printable or base64. This is good because you can upload files even if your mailer insists on doing the uuencode thing on its attachments, or if users try to bypass your filters by doing the same thing. MIME-Tools is pretty smart; it will even try to uncompress attachments if necessary so that your filters will work. What you may find odd is that this only happens if the uuencoding is done as part of a real MIME encapsulating, with Content-Type and Content-Transfer-Encoding and the like. You can of course uuencode something and paste the raw data right into a message without any MIME stuff; _that_ will come through just as you see it and your admin_body expression trapping 'begin xxx' will match. See Also: help admin_moderate help configset_access_rules help configset_admin_headers help configset_administrivia help configset_block_headers help configset_noarchive_body help configset_noarchive_headers help configset_taboo_body help configset_taboo_headers This is the "configset_admin_body" help document for Majordomo 2, version 0.1201103110. For a list of all help documents, send the following command: help topics in the body of a message to email@example.com.
If you need assistance, please contact the bugzilla.org administrators.
|Sign In||Sign Out||Mailing Lists||Unsubscribe or Change Settings||Help|