diff options
| author | cotton | 1998-10-12 15:59:01 +0000 |
|---|---|---|
| committer | cotton | 1998-10-12 15:59:01 +0000 |
| commit | 9950422e4337975279b02660e0a599cba8baca3c (patch) | |
| tree | dd4b633e7a3394490bb54287032f27aca3bcad3d /Mailman/MailList.py | |
| parent | 18680acd0a330b6d743816e74fbd65de1fc91455 (diff) | |
| download | mailman-9950422e4337975279b02660e0a599cba8baca3c.tar.gz mailman-9950422e4337975279b02660e0a599cba8baca3c.tar.zst mailman-9950422e4337975279b02660e0a599cba8baca3c.zip | |
added adminitrivia filter and an "administrivia" list attribute that
is editable via the admin cgi to turn the filter on and off.
I'm sure that the filter could catch more things, but it will have
less false positives than majordomo anway :)
a listing of the specific changes follows:
Defaults.py.in changed data file version and added
DEFAULT_ADMINISTRIVIA
Utils.py added a function IsAdministrivia(msg) that does the filtering
replaced re.sub with string.replace(much faster) in
(Un)ObscureEmail.
MailList.py: added the config info for the administrivia variable, and
made the post method check it if the list has the
variable set.
versions.py: make new lists have an administrivia variable
scott
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 82a12efd4..5aa8a2b90 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -278,6 +278,18 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, '"Reply-To" Munging Considered Harmful</a> for a general.' " discussion of this issue."), + ('administrivia', mm_cfg.Radio, ('No', 'Yes'), 0, + "check messages that are destined for the list for" + " adminsitrative request content?", + + "Administrivia tests will chech mail that is destined for the list " + " for adminstriative contect (like subscribe, unsubscribe, etc). " + " If the message looks like an adminitrative request, it will " + "be added to the administrative requests database and the administrator " + "will be notified. "), + + + ('reminders_to_admins', mm_cfg.Radio, ('No', 'Yes'), 0, 'Send password reminders to "-admin" address instead of' ' directly to user.', @@ -780,8 +792,8 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, def DeleteMember(self, name, whence=None): self.IsListInitialized() -# FindMatchingAddresses *should* never return more than 1 address. -# However, should log this, just to make sure. + # FindMatchingAddresses *should* never return more than 1 address. + # However, should log this, just to make sure. aliases = Utils.FindMatchingAddresses(name, self.members + self.digest_members) if not len(aliases): @@ -897,7 +909,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, return line return 0 -#msg should be an IncomingMessage object. + # msg should be an IncomingMessage object. def Post(self, msg, approved=0): self.IsListInitialized() # Be sure to ExtractApproval, whether or not flag is already set! @@ -953,6 +965,11 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, self.AddRequest('post', Utils.SnarfMessage(msg), Errors.IMPLICIT_DEST_MSG, msg.getheader('subject')) + if self.administrivia and Utils.IsAdministrivia(msg): + self.AddRequest('post', Utils.SnarfMessage(msg), + 'possible administrivia to list', + msg.getheader("subject")) + if self.bounce_matching_headers: triggered = self.HasMatchingHeader(msg) if triggered: |
