summaryrefslogtreecommitdiff
path: root/modules/mm_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* All these files have been moved to the Mailman directory (and some renamed)bwarsaw1998-06-191-506/+0
|
* Fixed a bug where sometimes a leading / is missing from PATH_INFO.viega1998-06-051-1/+3
|
* Added a method: GetNestingLevel(), which returns how many ../'s areviega1998-06-031-0/+11
| | | | | needed to get back to http://xxxx/mailman/ based on the PATH_INFO environment variable.
* Fixed a bug in wrap where wrap would error if the length of the stringviega1998-06-031-1/+1
| | | | being wrapped was the same as the column parameter.
* Integrated Scott's cookie code into the distribution.viega1998-05-301-0/+14
| | | | | | Note that it does have one problem... If you have cookies off, you have to log in every time, plus your changes don't take effect! That definitely needs to be fixed.
* Modfied DeliverToUser to use smtplib instead of a call to sendmail.viega1998-05-281-10/+12
| | | | | Note that I'm using my smtplib right now, and not the one that comes w/ Python 1.5. That should probably be changed.
* Removed RCS crudbwarsaw1998-05-261-3/+73
| | | | | | | | | | | | | | | | | wrap(): New function which implements the wrapping and filling algorithm, as described in the function's docstring. After talking it over with Guido and Ken, this seemed like the best compromise for ensuring that emailed messages to users look okay, when their MUAs don't auto-wrap. SendTextToUser(): Added optional argument raw which defaults to zero (meaning by default, wrap and fill as per the rules in wrap()). When raw=1, no wrapping or filling of the text argument is performed. While Ken thinks that wrapping/filling should be turned off by default, I think there are many more cases where the text should be wrapped and filled than not, so this go'round tries to minimize code changes. If the consensus is to invert the default value, we can make that change after grep'ing the code.
* Fixed a typo in the zipcode.viega1998-05-261-2/+2
|
* Added copyright notices to all source files where I am legally entitled to ↵viega1998-05-251-1/+18
| | | | | | | do so. Added a copy of the GNU GPL. Added information about mailman-users in README, and reworded some text in there (made the credits less verbose... perhaps they should move to a credits file?)
* Removed change_boundary() - not necessary, now that the Digest classklm1998-05-041-17/+1
| | | | is doing the right thing right off the bat.
* New routine change_boundary, for substituting one mime boundary forklm1998-04-271-1/+17
| | | | another.
* ValidEmail(): Elide the constraint that addresses have their top-levelklm1998-04-231-11/+11
| | | | | | domain among those iterated among valid_toplevels. Depending on ensuing discussion on the mailman-developers list, i'll probably cut this out completely.
* Added "su" to valid top levels.klm1998-04-231-2/+2
|
* DeliverToUser(): Add newline-terminators to add_header items whenklm1998-04-121-1/+3
| | | | | lacking. Otherwise, multiple ones will glom (were gloming) together on a single line.
* DeliverToUser(): Aha! Resolved elusive bug - addresses containingklm1998-04-111-2/+3
| | | | | | | | | | | quotes - eg, gordon_o'hara@vanguard.com - was losing the quote when passed on the command line to sendmail. Fixed by doing a repr() of th recipient, so eg gordon_o\'hara@vanguard.com was being passed - and accepted properly by sendmail. Now i think i have to do the same thing with scripts/deliver, sigh - it'd be good to get the direct SMTP based mechanism in, but i didn't have time to work it through, uncover the ramifications...
* Preparing to package a distribution - add a module docstring andmailman1998-04-091-0/+10
| | | | __version__ info.
* SendTextToUser(), DeliverToUser() - Generalized addition of specialklm1998-04-071-6/+9
| | | | | headers to a add_headers optional arg - a list for headers like Errors-To and X-No-Archive.
* Adding 'nofail' option to StampedLogger init, so programs that useklm1998-03-301-8/+23
| | | | | StampedLogger for debugging output can choose to initialize it so that failure is detectable, and thus can be handled in the program.
* AddressesMatch(): Do the right thing (in particular, no traceback!)klm1998-03-301-15/+29
| | | | | | | | | | when one of the addresses has no domain. StampedLogger(): New option manual_reprime makes better for use as sys.stderr substitute - says to put the timestamp only on first write or writes just succeeding a .reprime() call - so the timestamp divides separate multi-line entries. And in any case, write the timestamp/label prefix on when at the beginning of a new line.
* Include "manual_reprime" option in StampedLogger. When on (off byklm1998-03-291-5/+22
| | | | | | | | | | | default), timestamps will only be included at beginning of new entries after the first entry and after entries that are preceeded by a call to the .reprime() method. This is handy for when StampedLogger is used as a substitute for sys.stderr, where you would like to see groups of entries collected together in a single timestamp (and you often only have a single group, for uncaught exceptions where the script is failing...)
* Unlock only if alredy locked.mailman1998-03-271-1/+1
|
* Simpliefied FindMatchineAddress - it now only recognizes similaritymailman1998-03-261-25/+34
| | | | | | | | | | | | | | | | | | when the domain side of the at sign of one address properly contains the domain in the other example. Wrap DeliverToUser body in a os.fork, to prevent a deadlock which can happen when, eg, a message bounces before message aceptance in sendmail. Message bouncing early on in message acceptance by sendmail means reporting to list admin address, which is itself actually a mailman program, which uses the instantiated list as a agent, and which requires the same lock that the invoking process is holding - ie, deadlock Sendmail's deliver-in-background option would be great for this, except that the error processing for immediately recognized delivery problems turns out to be handled in the foreground, regardless of the bg delivery option.
* Added logger and moved SendTextToUser and DeliverToUsermailman1998-03-241-4/+107
| | | | | | | | | | | | | | | | | | functionalities here. Logger() and StampedLogger() routines provide file-like file logging mechanisms. (I reimplmented the list .LogMsg() method based on this routine.) This is implemented outside the list infrastructure so it can be used for, eg, stderr substitution. SendTextToUser() and DeliverToUser() implemented here likewise, so they can be used outside list context (eg, when lists are broken...). Made AddressesMatch not raise error when one of the address arguments yields a null domain. Moved comment about .FindMatchingAddresses() to be the function docstring.
* map_maillists() - New convenience routine for interactive pythonmailman1998-03-201-0/+26
| | | | | | | | sessions with lists, applies user specified routine to all of the lists, or optionally, those lists with user-specified names. Optional arg unlock says to unlocked immediately after instantiation, for non-invasive actions. Optional arg verbose says to print list name and result incrementally as they're handled.
* Moved list_names() here from where i recently created it,mailman1998-03-131-2/+14
| | | | | | | maillist.py. Moved abstract description part of comment before ValidEmail in as a docstring. (We need more and decent docstrings in this code!!)
* ObscureEmail(), UnobscureEmail(): new routines for invertablyklm1998-03-081-1/+20
| | | | | | | | | | | | | | transforming email addresses so they're not apparent to web spiders, therefore not scrapable by spammers. The UnobscureEmail transformation should work like an identity function on already-unobscured addresses, so it can be used with impunity. The routines should be used as functional interface to address obscuring, so the scheme can be changed transparently to the rest of the system, just by changing the routines. This should make it easy to up the ante in the thwarting of spammers, if this catches on.
* MakeDirTree(): Change default permission to 775 (was 774, previousklm1998-03-081-1/+1
| | | | 744) so group can get in created directories.
* MakeDirTree: use umask 774 rathern than 744, so group members doingklm1998-03-071-3/+8
| | | | | | | | development have access, also. More importantly, zero the umask before actually creating the dir (and restore it afterwards), so the permissions are exactly as specified, Also wrapped a long line.
* Get rid of gratuitous bare 'except:'.mailman1998-02-221-1/+1
|
* Initial revisionklm1998-01-071-0/+154