summaryrefslogtreecommitdiff
path: root/Mailman/MTA (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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...
* makealiases(): Apply patch by Jason Mastaler to fix SF bug #502419.bwarsaw2002-01-121-2/+2
| | | | There was a missing quote in the aliases string.
* Sigh. I think BerkeleyDB support is just plain broken in standardbwarsaw2001-12-241-1/+9
| | | | | | | Python. Fall back to the PyBSDDB module (a.k.a. bsddb3) if bsddb fails. Note to self: we need to fix the BerkeleyDB module for Python 2.3.
* makealiases(): To avoid name clashes with other MLM's, rename thebwarsaw2001-12-241-1/+1
| | | | wrapper program to `mailman'.
* Updates to work better with virgin invocation.bwarsaw2001-12-061-23/+33
| | | | | | | | | | | | | | | | | _zapfile(), _zapdb(): Only truncate the file if it already exists (so we don't accidently create it before we're ready to). addlist(): Make this robust for when mlist == None, as it will when there are no lists yet, but we want the preamble and minimal aliases and aliases.db files to get created. Moved the YP_* key settings up before the predicate shortcircuit. do_create(): Do the hashopen() before the built-in open() so it gets created properly by bsddb when it doesn't yet exist. create(): Check for mlist == None before digging out more attributes. Also, rewrote the big comment at the top concerning locking.
* genaliases interface conformance:bwarsaw2001-12-061-1/+17
| | | | | | makelock(), clear(): no-ops create(): Add an optional (ignored) nolock argument.
* makealiases(): Generate the new set of alias to script mappings.bwarsaw2001-11-301-10/+17
|
* Much changes for better virtual domain support.bwarsaw2001-11-261-33/+88
| | | | | | | | | | | | | | - Import bsddb directly instead of dbhash - delete virtual_files() - _zapfile(), _zapdb(): New internal function - clear(): New public function for clearing out both the plain text files and the db files. - addlist(), and friends: better support for writing virtual alias entries based on the value of POSTFIX_STYLE_VIRTUAL_DOMAINS.
* Support for Postfix-style virtual domains.bwarsaw2001-11-241-33/+105
| | | | | | | | | | | | | | | | | virtual_files(): Return the .db filename and text filename based on the host_name. addlist(): Some generalizations for the writing of the site list's loop entry. addvirtual(): Implements writing the virtual file plain text and dbhash files. do_create(), create(): Reorg to call both addlist() and addvirtual() if necessary. do_remove(), remove(): Reorg so that both the entries from the aliases file and the virtual file will be removed.
* makealiases(): The list of aliases now includes -bounces which goes tobwarsaw2001-11-201-4/+6
| | | | | | | | the new bounces script. -admin no longer delivers to the mailowner script since the mailowner script no longer does bounce processing. For backwards compatibility -admin goes to the bounces script now (should it?). Also, -owner is no longer an alias for -admin but pipes to the mailowner script directly.
* addlist(): When creating the aliases file for the first time, be surebwarsaw2001-11-201-1/+7
| | | | | | | | | | | to write out the mailman-loop address which is used to consume all messages sent to the mailman-owners address that bounces. This is now the best way to break bounce loops. All mail to mailman-loop@dom.ain will get appended to an mbox file called $prefix/data/owner-bounces.mbox. Similarly, make sure the mailman-loop address is in the database.
* Add missing import of Mailman.Utilstwouters2001-09-041-0/+1
|
* addlist(): Don't rely on the brilliant new feature in Python 2.1, wheretwouters2001-08-111-1/+1
| | | | the argument to time.ctime() defaults to 'the current time'.
* create(): Instead of using MAILMAN_OWNER, use Utils.get_site_email().bwarsaw2001-08-041-4/+6
| | | | The former config variable is going away.
* checkperms(): 'mode' -> 'stat[ST_MODE]'.twouters2001-07-101-1/+1
| | | | | | Slight style nit, too: code is using 'oct()' to convert mode to a string, instead of a '0%(mode)o' format. Changing this to make more sense would break translations, though :P
* create(), remove(): Take an optional flag `cgi' which indicatesbwarsaw2001-05-221-2/+2
| | | | | whether this is being invoked through-the-web (ttw). This is required by the API but ignored by the functions in this module.
* Fallback module for auto-creation/removal of lists.bwarsaw2001-05-221-0/+110
| | | | | | | | | | When a list is created or removed via the cli (i.e. bin/newlist), this prints an informative message containing the /etc/aliases entries to standard out. When a list is created or removed ttw, this sends an email message to MAILMAN_OWNER telling him what needs to be done (this isn't ideal but it's the best we can do).
* checkperms(): aliases.db should be owned by mailman now, not root.bwarsaw2001-05-111-2/+2
|
* create(), remove(): Before we write to the aliases.db file, we mustbwarsaw2001-05-111-2/+47
| | | | | | drop an exclusive advisory lock on it, so Postfix doesn't try to read the file while we're updating it. See the comment at the top of the file for a discussion of why we have to do this so cruftily.
* intermediatebwarsaw2001-05-101-0/+46
|
* List creation/removal hooks now keep both the plain text filebwarsaw2001-05-101-29/+120
| | | | | | | | | | | | | | | | | | | | | | | | `aliases' and dbhash file `aliases.db' in sync. Specifically, _addlist() => addlist() _rmlist(): Removed. addlist(): This now takes both a dbhash file and a file pointer to the plain text file and adds the new list entries into both. If the plain text file is empty (seek to end, tell() == 0), then an informative comment is added to the top. In the plain text file, `stanza' marker comments are used around the list alias entries. A trailing blank line is always added after the stanza. create(): This is now just a wrapper for addlist() (since addlist() is now used by bin/genaliases). remove(): Does the bulk of what _rmlist() used to do, plus it keeps the plain text file in sync. It searches for the appropriate stanza marker and removes every line between it and the stanza end marker. (Actually, it does this by copying to a tmp file and shuffling the tmp file to the real file.)
* checkperms(): Postfix-specific permission checks: make sure thebwarsaw2001-05-091-2/+48
| | | | | aliases.db file is perm'd 066x and that it's owned by root. The group-ownership by mailman is already checked by check_perms.
* intermediatebwarsaw2001-05-091-1/+0
|
* Checking in the usual .cvsignore, Makefile.in, and __init__.py files.bwarsaw2001-05-094-0/+159
Also, Postfix.py which contains the Postfix-specific code to run when creating or removing a mailing list.