[Mailman-Developers] Delivering messages to scripts/post
Barry A. Warsaw
Tue, 1 May 2001 00:20:38 -0400
>>>>> "JJ" == Jesper Jensen <email@example.com> writes:
JJ> We have been running Mailman on Windows for about two weeks
JJ> now and most things seem to work very well.
JJ> To make it run I had to make some changes - all of them minor
JJ> - and most of them related to opening files ('b').
Ah yes. That and pre-unlinking (i.e. unlinking a file you have open
because you know it will go away when the file is closed) are two
Unixisms that often bite me when porting Python code to Windows. I
try to be good, but old habits die hard. ;)
JJ> Mailmanwin (as I have named it) is probably not useful for
JJ> anyone but me (and my company) right now; some things do not
JJ> work at all (web interface, e-mail archive, usenet gateway,
JJ> all the bin scripts) and some things are changed to make them
JJ> better fit my needs.
What version of Mailman are you running? I'd be interested in looking
at any patches that help port Mailman to Windows (or any other
platform for that matter). I develop on Linux these days, and before
leaving CNRI, primarily Solaris. I'm fairly confident Mailman runs on
any (sane :) Unix-like OS, and I have nothing philosophical against
porting Mailman to any platform that Python runs on -- and that's a
lot of platforms. But I don't have much time to do that work myself,
so such porting necessarily relies on contributions from others.
JJ> I have made an "install" script doing all the work and
JJ> describing all the changes, so it's fairly easy getting
JJ> started. I hope to get a webpage up with these things soon.
When you're ready to submit patches, please upload them to
SourceForge. I've created a new patch category called "cross platform".
JJ> I don't expect the mailman developers to take account of any
JJ> of these changes. I fully understand and respect that this is
JJ> a Linux project and would hate if cross platform issues in any
JJ> way affected the future direction of Mailman. Having said
JJ> that, it would be nice if no module names conflicted with
JJ> modules in the standard Python distribution (mailbox) ;)
This should actually be better for Python 2.1 since the
case-sensitivity on imports for case-preserving case-insensitive file
systems (e.g. Windows) has been greatly improved (I've been told). I
thought about renaming Mailbox.py, but that's a PITA because I don't
want to lose the CVS history and renaming-retaining-history can't be
done without access to the CVS repository. I'll probably just require
MacOSX and Cygwin (and Windows :) users to use to Python 2.1.
Everyone else should be fine with Python 2.0 or 2.1.
JJ> 1. Delivering messages to scripts/post I could not find any
JJ> MTA for Windows (I didn't look much, though) that was able to
JJ> get the toaddr and deliver the message to scripts/post.
JJ> Instead we are using L-soft LSMTP (we used L-soft LISTSERV
JJ> before changing to Mailman). LSMTP is told to save all
JJ> messages (complete with all envelope header information) and I
JJ> have made a Python script that parses each message and calls
JJ> Enqueu with the correct parameters.
JJ> This works well, except that we have had a couple of mail
JJ> loops because of auto-responders replying directly to the
JJ> list. So my question is, what information does a MTA look for
JJ> before passing the message to post?
In the usual Unix MTA world, nothing, it's a dumb pipe. Mailman
itself looks at the incoming message for X-BeenThere headers and
raises a LoopError if it finds one that matches the list address.
There's no guarantee that'll be preserved during the loop though, and
in that case there isn't much that can be done.
JJ> I found out that filtering out all messages with daemon and/or
JJ> postmaster in the fromaddr is a good idea. Are there any
JJ> other "keywords" that i should know of?
You might look at LIKELY_BOUNCE_SENDERS in Defaults.py, which includes
mailer-daemon, orphanage, and postoffice though I can't personally
remember ever seeing bounce message originate from the latter two.
JJ> 2. Empty envelope fromaddr In some messages the envelope
JJ> fromaddr is empty. Is it safe to never deliver a message with
JJ> an empty envelope fromaddr to a list?
I've no idea, since I don't know why for you the From_ header is
JJ> 3. Using the envelope fromaddr or the message fromaddr I can
JJ> see that this is a Mailman setting. What are the consequences
JJ> of using only the envelope fromaddr?
In practice, you'll get a lot more holds if you limit postings to
members only. While the From: header is easily spoofable, it turns
out to be a much greater PITA to use the From_ header (which itself
isn't that hard to spoof).
JJ> Just for the record. L-soft LISTSERV is a great product - the
JJ> most solid/stable I have ever used. We chaned to Mailman
JJ> because we needed some things LISTSERV didn't have.
Cool! If you have the time, perhaps you can post a list of things you
like about LISTSERV that Mailman doesn't have, and vice versa.