People are probably familiar with teh current ability of exim to be configured to automagically see lists and handle them appropriately. There is also a wrapper (in scripts/auto) in MM 2.1 that attempts to do the same thing for postfix (BTW it will need updating for the additional aliases now used).
MM 2.1 uses some additional list entry points. This means that for an alias based approach to injecting mail there are now more aliases, and worse they aren't regular. Here's the alias set for a list with basename x (I have truncated the path on wrapper to make it fit without wrapping):-
x |wrapper post x x-admin |wrapper mailowner x x-request |wrapper mailcmd x x-join |wrapper join x x-leave |wrapper leave x x-bounces |wrapper bounces x x-owner |wrapper mailowner x
Additionally if VERP is being used, the bounces alias should also be matching stuff like x-bounces+aperson=dom.ain@mailhost.dom
Exim (and I guess other mailers - I'm going to talk on what I know and then let other folks talk on the other MTAs), can handle stuff based on regular expressions, so given a list x (matched by some magic - current config does it by checking if the file /home/mailman/lists/x/config.db exists) its dead easy to match an address suffix (I think the postfix folks call this an extension ) -(admin|request|join|leave|bounces|owner)
However, since the argument to wrapper varies with the extension I then need an additional lookup to convert that extention to the wrapper command.
So, for exim, life would be much easier if I could handle these (excluding the post command) by having
(.+)-(admin|request|join|leave|bounces|owner) map to |wrapper $2 $1
[$1 & $2 are the regexp matches from the expression above]
Barry - any chance of regularising the naming of the entry points, or adding aliases for admin, request and owner?? I would guess this approach would work for several different mailers.
BTW VERP could be handled by changing the intitial regexp to ([a-z0-9_-]*)-(admin|request|join|leave|bounces|owner)(\+.*)
An alternative approach might be that all addresses that are caught by the MTA list matching stuff are passed direct into the Mailman address handler, so you just invoked wrapper mailman-address-handler <address>
and let the python do the magic from there on.
Nigel.
If it was then possible to
"NM" == Nigel Metheringham <Nigel.Metheringham@Vdata.co.uk> writes:
NM> People are probably familiar with teh current ability of exim
NM> to be configured to automagically see lists and handle them
NM> appropriately. There is also a wrapper (in scripts/auto) in
NM> MM 2.1 that attempts to do the same thing for postfix (BTW it
NM> will need updating for the additional aliases now used).
I actually don't plan on updating auto for MM2.1. To use it requires you to configure Postfix in ways that could interact poorly with other parts of your mail system, depending on your topology. I'm not sure if I should leave it around for posterity, or just zap it.
NM> MM 2.1 uses some additional list entry points. This means
NM> that for an alias based approach to injecting mail there are
NM> now more aliases, and worse they aren't regular. Here's the
NM> alias set for a list with basename x (I have truncated the
NM> path on wrapper to make it fit without wrapping):-
| x |wrapper post x
| x-admin |wrapper mailowner x
| x-request |wrapper mailcmd x
| x-join |wrapper join x
| x-leave |wrapper leave x
| x-bounces |wrapper bounces x
| x-owner |wrapper mailowner x
NM> Additionally if VERP is being used, the bounces alias should
NM> also be matching stuff like
NM> x-bounces+aperson=dom.ain@mailhost.dom
NM> Exim (and I guess other mailers - I'm going to talk on what I
NM> know and then let other folks talk on the other MTAs), can
NM> handle stuff based on regular expressions, so given a list x
NM> (matched by some magic - current config does it by checking if
NM> the file /home/mailman/lists/x/config.db exists) its dead easy
NM> to match an address suffix (I think the postfix folks call
NM> this an extension ) -(admin|request|join|leave|bounces|owner)
Note that the current approach to auto-aliasing for Postfix actually does set up each and every alias -- no regexp matching is done. It's just that I know the format Postfix uses and we can write that format in Python, so updating them is hidden from the admin.
Aside 1: I believe Fil has an alternative approach for Postfix that does use regexps.
Aside 2: My current approach for Postfix may cause some logistical problems because it requires that the version of Berkeley DB that Postfix is linked against be the same as the version that Python is linked against, and it's notoriously hard to get this right in Python. Especially in Python 2.0.x which doesn't build the bsddb module by default (though Python 2.1.x does, which is one of the reasons I'm considering requiring it for MM2.1).
Aside 3: MM2.1 won't use marshal as it's serialization format any more; it uses pickle so the landmark file needs to be config.pck instead (although that file will only exist after the first time the list is opened and saved -- we could make sure the upgrade script does this for every list though).
Aside 4: There was an interesting idea, in SF I think, that maybe the MTA should just delivery to an mbox file, and then Mailman's qrunners should just walk the mbox file. We'd have to coordinate locking b/w Mailman and the MTA, so that could be problematic. OTOH, it would save having to fork the wrapper script just to dump the plain text in the queue.y
NM> However, since the argument to wrapper varies with the
NM> extension I then need an additional lookup to convert that
NM> extention to the wrapper command.
NM> So, for exim, life would be much easier if I could handle
NM> these (excluding the post command) by having
| (.+)-(admin|request|join|leave|bounces|owner)
| map to
| |wrapper $2 $1
NM> [$1 & $2 are the regexp matches from the expression above]
NM> Barry - any chance of regularising the naming of the entry
NM> points, or adding aliases for admin, request and owner?? I
NM> would guess this approach would work for several different
NM> mailers.
I've thought the same thing. I avoided in the past because it would have required regeneration of aliases, but now that we've bit that bullet, I think it does make sense to regularize them. I'll have to see if I can get SF to make copies of the cvs files so I can preserve the historical record, but I think it's a good idea.
| BTW VERP could be handled by changing the intitial regexp to
| ([a-z0-9_-]*)-(admin|request|join|leave|bounces|owner)(\+.*)
VERP format will be very configurable, so as long as you can write a Python regexp to pull it apart, you can basically tell Mailman to use any VERP format you want.
NM> An alternative approach might be that all addresses that are
NM> caught by the MTA list matching stuff are passed direct into
NM> the Mailman address handler, so you just invoked wrapper
NM> mailman-address-handler <address>
NM> and let the python do the magic from there on.
I've found it convenient to do a little bit of preprocessing in the wrapper script and knowing beforehand which alias the message is being delivered to. One reason is because I don't want to force the wrappers to parse the email messages. Parsing is expensive, and potentially error prone, and the wrapper can't gracefully handle the errors without a lot of complexity. Which slows things down. Which increases the possibility of mail filter timeout. Which we definitely want to avoid at all costs.
To sum up: let's regularize the wrapper script names so that they are the same as the extension they feed off of (sans the separating dash). One catch is for the -admin address; I want this to go to the bounces script for backwards compatibility. So I guess we need to make a symlink from scripts/bounces -> scripts/admin ...?
NM> Nigel.
-Barry
NM> If it was then possible to
Maybe, but only if we
I actually don't plan on updating auto for MM2.1. To use it requires you to configure Postfix in ways that could interact poorly with other parts of your mail system, depending on your topology. I'm not sure if I should leave it around for posterity, or just zap it.
Hey Barry,
So then are you saying that you are going to nuke the list creation stuff?
If it will stay, also please think about updating the Postfix virtual file. That is necessary on any system receiving mail for more than one domain.
Bob
"BP" == Bob Puff <bob@nleaudio.com> writes:
BP> So then are you saying that you are going to nuke the list
BP> creation stuff?
No, definitely not!
BP> If it will stay, also please think about updating the Postfix
BP> virtual file. That is necessary on any system receiving mail
BP> for more than one domain.
Hmm, my current approach has simply been to write db entries to a file pointed to by the alias_maps variable. I need to think about this approach in the face of virtual domains...
-Barry
Hmm, my current approach has simply been to write db entries to a file pointed to by the alias_maps variable.
Right, and this is still necessary. But the virtual maps are also equally as important, since the newbies are still gonna say "Why is mail to the list bouncing if it automagically creates everything?!".
Updating the /etc/postfix/virtual file takes the Postfix postmap command to generate its database file, which is a little different from the postalias program that you run/emulate now.
Bob
At 06:47 PM 11/21/2001 -0500, Bob Puff/NLE wrote:
Right, and this is still necessary. But the virtual maps are also equally as important, since the newbies are still gonna say "Why is mail to the list bouncing if it automagically creates everything?!".
You have to draw the line as to how far you're going to 'dummy proof' your software. Not everyone uses virtual maps in this manner. I don't.
Updating the /etc/postfix/virtual file takes the Postfix postmap command to generate its database file, which is a little different from the postalias program that you run/emulate now.
I won't let any automatic process touch my master virtual file. The current setup (as of 2.1a3) works just fine; it takes control of one specific file which I bless. I then make postfix include it in alias processing. It's simple and works. Move it to ./contrib if needed, but please don't toss it.
Bob
-- Christopher Schulte christopher@schulte.org http://noc.schulte.org/
On Wed, 21 Nov 2001 18:24:30 -0500 Barry A Warsaw <barry@zope.com> wrote:
I actually don't plan on updating auto for MM2.1. To use it requires you to configure Postfix in ways that could interact poorly with other parts of your mail system, depending on your topology. I'm not sure if I should leave it around for posterity, or just zap it.
Drop it in an "unsupported" subdirectory?
-- J C Lawrence ---------(*) Satan, oscillate my metallic sonatas. claw@kanga.nu He lived as a devil, eh? http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
On Wed, 2001-11-21 at 23:24, Barry A. Warsaw wrote:
"NM" == Nigel Metheringham <Nigel.Metheringham@Vdata.co.uk> writes: NM> An alternative approach might be that all addresses that are NM> caught by the MTA list matching stuff are passed direct into NM> the Mailman address handler, so you just invoked wrapper NM> mailman-address-handler <address> NM> and let the python do the magic from there on.
I've found it convenient to do a little bit of preprocessing in the wrapper script and knowing beforehand which alias the message is being delivered to. One reason is because I don't want to force the wrappers to parse the email messages. Parsing is expensive, and potentially error prone, and the wrapper can't gracefully handle the errors without a lot of complexity. Which slows things down. Which increases the possibility of mail filter timeout. Which we definitely want to avoid at all costs.
Barry, what I was suggesting is that Mailman parses the address, not the message, so a message to the list would be piped in to
|superwrapper x@dom.ain
a join request would be passed in to
|superwrapper x-join@dom.ain
and a VERP bounce would go to
|superwrapper x-bounces+sub=their.dom.ain@dom.ain
For exim handling this is getting into the seriously trivial catagory, and I would expect most other MTAs to find it easy. The @dom.ain bit could be optional, but might have future expansion possibilities for the virtual domain handling some people want.
Nigel.
participants (6)
-
barry@zope.com
-
Bob Puff/NLE
-
Christopher Schulte
-
J C Lawrence
-
Nigel Metheringham
-
Nigel Metheringham