| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
| |
|
|
| |
There was a missing quote in the aliases string.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
wrapper program to `mailman'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_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.
|
| |
|
|
|
|
| |
makelock(), clear(): no-ops
create(): Add an optional (ignored) nolock argument.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
the argument to time.ctime() defaults to 'the current time'.
|
| |
|
|
| |
The former config variable is going away.
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
| |
whether this is being invoked through-the-web (ttw). This is required
by the API but ignored by the functions in this module.
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.)
|
| |
|
|
|
| |
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.
|
| | |
|
|
|
Also, Postfix.py which contains the Postfix-specific code to run when
creating or removing a mailing list.
|