summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* clear(): Fix the file names given to _zapfile().bwarsaw2002-02-141-2/+2
|
* makealiases(): Remove the special case for the `admin' script; it'sbwarsaw2002-02-141-2/+1
| | | | treated like all the other scripts now.
* A slightly cleaner way to do the freshening of MailList objects.bwarsaw2002-02-121-7/+6
| | | | | | | | | run(): After once through the loop, look at the freshen flag and if true, clear the cache. Thus all subsequent MailList objects will get updated state, but we'll gain the performance benefits of the cache for each iteration the the big loop. _open_list(): Return this function to its original state.
* __init__(): Default the self._freshen attribute to zero.bwarsaw2002-02-121-2/+13
| | | | | _open_list(): If we've pulled the list object from the cache, then freshen the state by re-Load()-ing it.
* __init__(): Set self._freshen so that the MailList cache in the basebwarsaw2002-02-121-9/+7
| | | | | | | | class knows to reload the state when pulling the object from the cache. Hmm, why do we even have a cache now? _dispose(): Don't do the `verp' key calculation here; it's done earlier and better in the ToOutgoing.py handler.
* process(): Set the `verp' key in the metadata here, based on post_idbwarsaw2002-02-121-1/+13
| | | | | | | and VERP_DELIVERY_INTERVAL. We used to do this in OutgoingRunner, but that was inconvenient due to the latter never freshing the state of MailList objects (that's fixed, but this is still a better place to set this key).
* Move the path hacking addition of the site-packages directory to thebwarsaw2002-02-121-10/+1
| | | | | | | | | paths.py.in file. The problem is that even for Python 2.2, we need site-packages to appear /before/ the standard library so that we can pick up the newer version of the email package. Defaults.py/mm_cfg.py is usually imported to late in the game to work, but paths.py is about right (although we'll have to audit the command line scripts to make sure they import paths.py before they import email.*).
* create(): When creating the UserNotification message object, pass inbwarsaw2002-02-111-2/+2
| | | | | | | the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* process(), hold_for_approval(), do_discard(): When creating thebwarsaw2002-02-114-10/+7
| | | | | | | | UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* process_request(): When creating the UserNotification message object,bwarsaw2002-02-111-2/+2
| | | | | | | pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* InitVars(), ArchiveMail(): The start of some cleanups flagged bybwarsaw2002-02-111-4/+0
| | | | Pychecker. Removed some unused local variables.
* ParseMailCommands(): When creating the UserNotification messagebwarsaw2002-02-111-10/+4
| | | | | | | object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield, with modifications by Barry.
* __handlepost(), HoldSubscription(): When creating the UserNotificationbwarsaw2002-02-111-11/+20
| | | | | | | | | | | message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Note that in the former method, we try to set the language to the forwarding address, if it is a member of the list. If not, the list's preferred language will be used. Patch by Ben Gertzfield, with modifications by Barry.
* SendSubscribeAck(), SendUnsubscribeAck(), MailUserPassword(): Whenbwarsaw2002-02-111-4/+5
| | | | | | | | creating the UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* __sendAdminBounceNotice(), sendNextNotification(), BounceMessage():bwarsaw2002-02-111-5/+7
| | | | | | | | When creating the UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* AddMember(), ApprovedAddMember(), ApprovedDeleteMember(): Whenbwarsaw2002-02-111-6/+3
| | | | | | | | creating the UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* UserNotification.__init__(): Add a `lang' optional argument so thatbwarsaw2002-02-111-3/+10
| | | | | | | charset information can be propagated into the headers, if necessary. Use the new mimelib/email package's Charset and Header classes. Patch by Ben Gertzfield. Requires email 0.97.
* Massive simplification to avoid making all the BerkeleyDB callsbwarsaw2002-02-091-155/+62
| | | | | | | | | | | | | | | | | | | | | ourselves. Given the incompatible state of BDB libraries on most modern Linux distros, and given the sorry state of affairs in Python's BDB wrappers, this is the only sensible solution. Essentially, I've kept all the plain text (data/aliases and data/virtual-mailman) update code, and then we just call postalias and postmap on the files to get the .db counterparts regenerated. This should be foolproof since only Postfix itself needs to use consistent libraries -- attempting to match Postfix and Python would be a nightmare. I don't believe we're opening ourselves up to any vulnerabilities by using os.system() in this case. Also: all functions which are not meant to be part of the public MTA interface are now prefixed by a single underscore. I'm too tired to give detailed changes...
* POSTFIX_ALIAS_CMD, POSTFIX_MAP_CMD: External commands for convertingbwarsaw2002-02-091-0/+7
| | | | | | the plain text aliases and virtual-mailman files to their .db counterparts. This will be /much/ less fragile than direct BerkeleyDB hacking. See accompanying change to Postfix.py.
* setBounceInfo(): Dan Mick recognized that set/getBounceInfo() weren'tbwarsaw2002-02-091-0/+1
| | | | | operating case insensitively w.r.t. the member key. Coerce the member argument to lower case before it's used.
* GetStandardReplacements(): Be sure to pass the lang argument to thebwarsaw2002-02-051-2/+2
| | | | | | GetLangSelectBox() call for the <mm-list-langs> replacement, otherwise a user's option page will always reset the user's language to the list's preferred language.
* removeMember(): Untested patch to clean up bounce_info andbwarsaw2002-02-051-2/+1
| | | | | delivery_status attributes when deleting a member. Don't call setBounceInfo() directly.
* sendNextNotification(): Remove the call to setBounceInfo() sincebwarsaw2002-02-051-1/+0
| | | | | | removeMember() -- which is eventually called by ApprovedDeleteMember() should to any necessary cleanup of the bounce info. Found by Dan Mick.
* Sigh. Copyright years.bwarsaw2002-01-301-1/+1
|
* Document.Format(): Add support for optional favicon.bwarsaw2002-01-301-0/+3
|
* SHORTCUT_ICON: New variable holding name of favicon in IMAGE_LOGOSbwarsaw2002-01-301-0/+3
| | | | directory.
* __handlesubscription(): Don't allow an empty comment in subscriptionbwarsaw2002-01-301-1/+3
| | | | refusal messages. Use the same default as in __handlepost().
* reset(): Dan Mick discovered a cut-n-paste error! info. -> self.bwarsaw2002-01-291-4/+4
|
* CheckCookie(): If the SimpleCookie constructor throws a CookieError,bwarsaw2002-01-291-1/+4
| | | | catch it and return false.
* Urg. Bump copyright years.bwarsaw2002-01-291-1/+1
|
* getBouncingMembers(): New interface method to return the list ofbwarsaw2002-01-292-0/+12
| | | | | | members with bounce info. This overlaps w/ getDeliveryStatusMembers() since it will return members who have bounced, but have not yet reached the disable threshold.
* To better support a patched email package w/ Python 2.2, prependbwarsaw2002-01-291-4/+5
| | | | | sitedir to sys.path instead of appending it. This means our email package will override the one in Python 2.2.
* Several fixes to improve the bounce score testing when thebwarsaw2002-01-291-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | administrator has adjusted the threshold (inspired by Dan Mick). Specifically, ZEROHOUR_PLUSONEDAY: New constant that is supposed to represent the day containing the first midnight after the epoch. We'll add (0,)*6 to this tuple to get a value appropriate for time.mktime(). _BounceInfo.reset(): New method to encapsulate resetting stale bounce scores. Also used in the constructor. registerBounce(): Implement refined rules for setting and checking the bounce score. As described in a message to mailman-developers: 1) are we a member? No, return 2) do we have previous bounces? No, register it, skip to step 7 3) is the member disabled? yes, return 4) is the bounce info from today? yes, don't increment, skip to step 7 5) is the info stale? yes, reset it and skip to step 7 6) increment score for today's bounce 7) is score > threshold? yes, disable 'em. disableBouncingMember(): Refactor since cron/disabled can call this method too now. __sendAdminBounceNotice(): msg argument can now be a Message instance or a string. Wrap in a MIME* instance as appropriate.
* getMemberPassword(): Donal Hunt notices that this didn't end in abwarsaw2002-01-261-0/+1
| | | | "raise NotImplemented".
* get_switchboard(): Code cleanup. _sbcache does not need to bebwarsaw2002-01-261-2/+1
| | | | declared global.
* dequeue(): Handle the case when the email package throws abwarsaw2002-01-261-1/+17
| | | | | | | | | | MessageParseError during parsing of the message. Most likely cause is because of bad MIME encapsulation. /That's/ likely caused by the message being a virus <wink>. Disposition depends on QRUNNER_SAVE_BAD_MESSAGES. When true, the message text is saved in qfiles/bad. When false, it is discarded. We always log the error.
* _dispose(): The mlist.Save() call should be in the try: block, sincebwarsaw2002-01-261-1/+1
| | | | | not making it to the end of the try ought to be morally equivalent to an aborted transaction.
* inject(): Extend the signature of the function so that we can pass inbwarsaw2002-01-261-4/+6
| | | | the queue directory to inject to, defaulting to qfiles/in.
* Added new configuration variables BADQUEUE_DIR andbwarsaw2002-01-261-0/+8
| | | | | | QRUNNER_SAVE_BAD_MESSAGES. The latter controls what Mailman should do when it encounters a parse error on the email message (likely because of bad MIME encapsulation, itself likely because it's a virus).
* scanbody(): In Python 2.2, email.Iterators.body_line_iterator() willbwarsaw2002-01-231-2/+2
| | | | | return a generator, which doesn't have a pop() method. Always convert it to a concrete list object first.
* decorate(): It's simply too easy to write %(foo)s strings that canbwarsaw2002-01-231-6/+19
| | | | | | trick Python into potentially revealing too much information. So instead of using the MailList's __dict__ and removing known sensitive entries, we create a whitelisted dict with only known safe entries.
* Updates to module docstring.bwarsaw2002-01-231-2/+2
|
* Some added robustness for corruption of the requests.db file.bwarsaw2002-01-231-3/+16
| | | | | | | | __opendb(): Catch EOFError that marshal.load() could throw. In that case, log the error and blow away the old database. __closedb(): A more robust save of the requests.db file. Save to a temp file first and then atomically os.rename() it to the real file.
* main(): Don't check for `request_login' in the cgi form data, becausebwarsaw2002-01-221-1/+1
| | | | that key is obsolete.
* main(), change_options(): Don't check for `request_login' in the cgibwarsaw2002-01-221-13/+4
| | | | | form data, because that key is obsolete. In change_options(), removed Scott's way old comment since I think it's no longer applicable.
* GetConfigInfo(): Add list configuration attributesbwarsaw2002-01-211-2/+26
| | | | | member_moderation_action and member_moderation_notice. Also, add a separator for "Member filters" vs. "Non-member filters".
* NewVars(): Pick up new list attributes member_moderation_action andbwarsaw2002-01-211-0/+4
| | | | member_moderation_notice.
* DATA_FILE_VERSION: Bump to pick up new list attributesbwarsaw2002-01-211-1/+1
| | | | member_moderation_action and member_moderation_notice.
* InitVars(): Add new list attributes: member_moderation_action andbwarsaw2002-01-211-0/+5
| | | | member_moderation_notice.
* Some elaboration of the member moderation flag semantics. Now it'sbwarsaw2002-01-211-2/+25
| | | | | | | | | | | | | | | possible to assign an action to the flag, which ought to work better for e.g. announce-only lists. Specifically, process(): If we're looking at a member and that member has their moderation flag turned on, then we look at mlist.member_moderation_action. This is a 3-way selector specifying whether the message should be held for approval, rejected (bounced), or discarded. There's also a member_moderation_notice attribute which includes text to send back to the member when their posting is automatically rejected (WIBNI we could include that text in any held or discard notification? Too much code disruption to do that right now).