
Does mailman have the ability to send one email to globally subscribe to all lists on the server?
thx for the help.
-sean

What would be the best way (if there is one) in Mailman to remove all attachments before maximum message size value sends the message to moderator for approval?. I have read archives about demime and stripmime but perl and other scripts make me nervous - i am not very good at this stuff and don't even know where to begin.
Regards, Alex

Alex wrote:
What would be the best way (if there is one) in Mailman to remove all attachments before maximum message size value sends the message to moderator for approval?. I have read archives about demime and stripmime but perl and other scripts make me nervous - i am not very good at this stuff and don't even know where to begin.
The issue you see arises because the Hold handler which enforces the maximum message size comed earlier in the handler pipeline than the MimeDel handler which does content filtering.
What I do for my production site is add the following lines to mm_cfg.py
# # Put MimeDel ahead of Hold so "too big" is based on content filtered # message. # GLOBAL_PIPELINE.remove('MimeDel') GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Hold'), 'MimeDel')
(Only the last two are required. The first 4 are documentation of what's being done).
The result of this is the message is not held if content filtering reduces its size below the max. Also, any messages held for 'miscellaneous' reasons have already been content filtered, but messages held for 'membership' reasons (non-member or moderated member) will be content filtered after approval.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

This was a two part question and Marc, thank you very much, second part was answered and it works great! Now to the first part - the key word was 'all' - is there a wildcard for <content filtering> - <Remove message attachments that have a matching filename extension> field that will cover all and any attachment filename extension? Or what would be the best way to remove all attachments in Mailman without installing any more software - i'm surprised i got this far as it is and don't want to push my luck.
Regards and happy holidays to all!
----- Original Message ----- From: "Mark Sapiro" <mark@msapiro.net> To: "Alex" <arogozin@comcast.net>; <mailman-users@python.org> Sent: Monday, December 29, 2008 11:42 AM Subject: Re: [Mailman-Users] yet another message filtering question
Alex wrote:
What would be the best way (if there is one) in Mailman to remove all attachments before maximum message size value sends the message to moderator for approval?. I have read archives about demime and stripmime but perl and other scripts make me nervous - i am not very good at this stuff and don't even know where to begin.
The issue you see arises because the Hold handler which enforces the maximum message size comed earlier in the handler pipeline than the MimeDel handler which does content filtering.
What I do for my production site is add the following lines to mm_cfg.py
# # Put MimeDel ahead of Hold so "too big" is based on content filtered # message. # GLOBAL_PIPELINE.remove('MimeDel') GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Hold'), 'MimeDel')
(Only the last two are required. The first 4 are documentation of what's being done).
The result of this is the message is not held if content filtering reduces its size below the max. Also, any messages held for 'miscellaneous' reasons have already been content filtered, but messages held for 'membership' reasons (non-member or moderated member) will be content filtered after approval.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

on 12/30/08 10:03 PM, Alex said:
Now to the first part - the key word was 'all' - is there a wildcard for <content filtering> - <Remove message attachments that have a matching filename extension> field that will cover all and any attachment filename extension?
Unfortunately, no.
You can try using the other field, where you specify the attachment types you will allow. All others will be stripped.
Or what would be the best way to remove all attachments in Mailman without installing any more software - i'm surprised i got this far as it is and don't want to push my luck.
You could also do attachment stripping inside your MTA, or in another program that gets called by your MTA before it calls Mailman. There are programs with names like "demime" and "stripmime" which might be helpful here.
-- Brad Knowles <brad@shub-internet.org> If you like Jazz/R&B guitar, check out LinkedIn Profile: my friend bigsbytracks on YouTube at <http://tinyurl.com/y8kpxu> http://preview.tinyurl.com/bigsbytracks

Brad Knowles wrote:
on 12/30/08 10:03 PM, Alex said:
Now to the first part - the key word was 'all' - is there a wildcard for <content filtering> - <Remove message attachments that have a matching filename extension> field that will cover all and any attachment filename extension?
Unfortunately, no.
You can try using the other field, where you specify the attachment types you will allow. All others will be stripped.
Or what would be the best way to remove all attachments in Mailman without installing any more software - i'm surprised i got this far as it is and don't want to push my luck.
You could also do attachment stripping inside your MTA, or in another program that gets called by your MTA before it calls Mailman. There are programs with names like "demime" and "stripmime" which might be helpful here.
To give a little more detail, Mailman's content filtering is based primarily on MIME Content-Type:.
You can filter based on file name extension, but that filter only affects MIME parts that have a filename or name parameter in the Content-Disposition: header or a name parameter in the Content-Type: header. Many MIME parts will not have a name/filename so they can't be filtered based on extension.
The concept of attachment is not well defined in MIME. There is a Content-Disposition: header that can specify inline or attachment, but Mailman doesn't look at it.
You can set pass_mime_types in content filtering to just text/plain, and this will filter out everything but text/plain parts. It will still pass text/plain "attachments" however.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 12/31/08 11:34, Mark Sapiro wrote:
You can filter based on file name extension, but that filter only affects MIME parts that have a filename or name parameter in the Content-Disposition: header or a name parameter in the Content-Type: header. Many MIME parts will not have a name/filename so they can't be filtered based on extension.
I don't know of any email client that will send an attached file with out the "name" parameter to the Content-Type: header. So, with this in mind, it should be possible to deduce that any MIME section that is not text/plain or text/html (or their multipart/alternative encapsulation) that does not have a "name" parameter is very likely embedded content and as such probably ok to remove.
The concept of attachment is not well defined in MIME. There is a Content-Disposition: header that can specify inline or attachment, but Mailman doesn't look at it.
I think the word "attachment" needs to be better defined here. Are you referring to what an email author ""attaches to a message, or any thing else that is embed with in the message. I think the actual attachment (by the message author) will always have a Content-Disposition of attachment. It should only be embedded content that differs. Though, I know that some MUAs will embed pictures rather than attaching them.
Grant. . . .

On Fri, Dec 26, 2008 at 07:17:30AM -0800, Mark Sapiro wrote:
Sean Wilkins wrote:
Does mailman have the ability to send one email to globally subscribe to all lists on the server?
No.
I've used list_lists, awk, a while/do loop and add_members to do something similar.
Add the email addresses of those to be subscribed to all lists to a file, and use that (if you're mad^Wso inclined, a web-form that collects the email addy into a database/text file could be used too).
Doesn't work for newly created lists, but nothing stopping cron running a check or something (or running add_members after creating a new list)
YMMV.
-- ``Odd things, animals. Dogs look up to you. Cats look down to you. Only pigs see you as an equal.'' (Churchill)

I've used a varaition to this. I've got a few 100 lists that are logically broken into domains and sub-domains. A domain might consist of dozens of lists and a sub-domain into a handful of lists. I've got a web front end that creates a web page with all the lists one can join-- click on the link and a mail message is pre-formated to sub or unsub to the list. Just hit send to sub or unsub to the mail message to join/leave the list. This is easy if one just needs to join one list, it's a pain if you need to join all lists in a domain (dozens)
To deal with a folks wanting to join/leave all lists within a domain, I've created a number of placeholder entries in /etc/alias.
On the web page, I've create a sub/unsub links for each domain or subdomain that points to the placeholder mail address name. Click on the link and a preformated mail message is created to sub or unsub for all lists in the doimain and then the user just hits send.
In /etc/alias, I have entries like this:
domain1-request: "|/path/to/script.pl"
"domain1-request" is one of the placeholder mail addresses on the server. When mail gets delivered to this address it actually gets processed by "script.pl". "script.pl" pulls out the subject, from address and then parses the to address. The "to" addresses use a common syntax-- in reality "domain1" refers to a file name on the mailman server. "script.pl" opens the file "domain1" which contains all the specific lists associated with this domain. The script then performs an add user or remove user (based on whether the subject is subscribe or unsubscribe) for each list enumerated in the "domain1" file.
The end result to the user is that the click on a single link, and instantly get added or removed from all of the lists within that domain. They also get a mail notification from each list they got added to or removed from.
[Note that this is a closed server/env so I've disabled the "reply to this mail to confirm" as it would mean user action for each of the lists within the domain]
Cheers
Adam McGreggor wrote:
On Fri, Dec 26, 2008 at 07:17:30AM -0800, Mark Sapiro wrote:
Sean Wilkins wrote:
Does mailman have the ability to send one email to globally subscribe to all lists on the server?
No.
I've used list_lists, awk, a while/do loop and add_members to do something similar.
Add the email addresses of those to be subscribed to all lists to a file, and use that (if you're mad^Wso inclined, a web-form that collects the email addy into a database/text file could be used too).
Doesn't work for newly created lists, but nothing stopping cron running a check or something (or running add_members after creating a new list)
YMMV.
participants (7)
-
Adam McGreggor
-
Alex
-
bergenpeakï¼ comcast.net
-
Brad Knowles
-
Grant Taylor
-
Mark Sapiro
-
Sean Wilkins