summaryrefslogtreecommitdiff
path: root/modules/mm_utils.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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