[Mailman-Users] Re: Re: use of MIME stripping plugins

Desert Hawk brooksj at wildhorse.com
Wed Apr 3 04:31:13 CEST 2002

the saga continues...don't worry, it has a happy ending   :)

On Tue, 2 Apr 2002, Skip Montanaro wrote:
>     Jo> I'm about ready to try Alex's stripmime.pl, because I've tried every
>     Jo> imaginable configuration and can't seem to get the patch from
>     Jo> sourceforge to work at all...and no one here has fessed up yet that
>     Jo> they've got it working on their install.
>     ...
>     Jo> (using FreeBSD 4.4, sendmail 8.11.6, Python 2.1.1, Mailman 2.0.8)
> I had a little difficulty getting StripMime to work with setndmail.  It
> turns out that aliases like
>     foo:  "| prog1 | prog2 | ... | progN"
> don't work because sendmail (or smrsh) strips everything through the last
> pipe character.  You need to write a little shell script that does the above
> piping and make it the target of the alias.
> That said, I have no idea if this is the cause of your problems, but it
> might be worth one last try before throwing in the towel on the sf patch.

My whole reason for trying the patch first was because it kept the
whole thing Python.  I love Perl to death, and I love Mailman to death, 
and mixing the two just felt like cheating  ;)

So, I started all over with the sourceforge patch, and I got things
working mostly as expected with the help of this archived post:


There were five modules that the patch created, FilteringMimeWriter.py,
PlainText.py, PlaintextMimeWriter.py, multifile.py and richtext.py.  But
they were created outside of the Mailman directory in my source tree, 
so I took a wild guess and put all five in ~mailman/Mailman.

So now, the option to force all posts to plain text shows up in the
General configs page, but now when my guinea pigs try to post, this
error shows up:

File "/home03/mailman/Mailman/Handlers/HandlerAPI.py", line 79, in do_pipeline
	mod = __import__('Mailman.Handlers.' + modname)
ImportError :  No module named PlainText 

now, I'm not all that familiar with Python, so I took another wild 
guess that this error meant that I should have put that code in 
Mailman/Handlers instead, right?

"Let's Play..."

so, I moved PlainText into Handlers, and ran ~/bin/update and waited
for the next qrunner to spawn, which gave me this new error instead:

File "/home03/mailman/Mailman/FilteringMimeWriter.py", line 27, in ?
    from Mailman.pythonlib import multifile
ImportError :  cannot import name multifile

so, figuring that something else was funky, I read the entire patch
itself.  for some reason, the patch created the new files, but didn't 
put them in the all right directories (anyone know why?)  

Once i moved multifile.py into the pythonlib directory, poof, the test 
messages started flowing.

So i've got the sourceforge patch installed, and it appears to be
working.  Talk about your unexpected adventures.... 

Thanks for the input, Alex, Skip.


More information about the Mailman-Users mailing list