Help on GNU MailMan MailList manager.
Contents
Contents
Block Email Not From a Domain
For corporate use you sometimes want to block all email to a list which isn't from your own domain (especially with the rising amounts of spam). This is easier in modern versions of MailMan and harder in older ones. For version 2.0 and newer you can do it by putting the below RegularExpression into the "bounce_matching_headers" field (at the bottom of the "privacy" web page).
From:.*@(?!spack\.org)
Mundging Email Addresses in the Archives
Some people get grumpy because they feel that public mail list archives allow spambots to harvest their email address. Well Mailman has an easy, but hard to find, feature to stop this.
In your /etc/mm_cfg.py (or where ever it's kept for your distro) set this variable:
ARCHIVER_OBSCURES_EMAILADDRS = 1
If you don't like the way that Mailman munges the "From:" address you can mess around with the regex on these lines in Mailman/Archiver/HyperArch.py:
if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
self.email = re.sub('@', ' at ', self.email)
Archives to RSS Feeds
RyanWise hacked up a script which if pointed at the date.html archive page scrapes Mailman the archive and turns them into RSS feed with one item per message. Ryan's version takes into consideration threads so if you point it at the thread.html archive (it still works in the old way with the date.html archive) it will do one RSS item per thread and also count the number of posts in the threads. Nice. It's now in use over at CSOF and will hopefully be in use on the PersonalTelco site soon. Thanks Ryan!
Note: The latest CVS version of MailMan will actually generate RSS feeds for you. Look for it in a release version soonish, yay! (2003.09.15)
Instead of parsing the MailMan HTML archives, another alternative is parsing the raw mbox files that MailMan uses to generate the archives, the downside of this is that it requires access to the raw mbox file which you will probably only have for your own lists.
Per-list Precedence Settings
By default MailMan inserts a "Precedence: bulk" header into every message which passes through it which doesn't already have a "Precedence" header. You can modify this behavior in MailMan/Handlers/CookHeaders.py:
if not msg.get('precedence'):
msg['Precedence'] = 'bulk'
If you want to modify the settings on a per list basis a bit more is involved, BarryWarsaw describes one technique on the MailMan MailList. Modify CookHeaders.py by adding a test for a per-list custom tag "omit_precedence_bulk":
if not getattr(mlist, 'omit_precedence_bulk', 0):
msg['Precedence'] = 'bulk'
And then add the custom tag to the lists which you don't want the "Precedence: bulk" header added by using the MailMan/bin/withlist command:
# python -i bin/withlist -l mynonbulkylist Loading list stage (locked) >>> m.omit_precedence_bulk = 1 >>> m.Save() >>> ^D Unlocking (but not saving) list: stage Finalizing