We are beginning to make use of Mailman here (good work!), and we are using it to provide company wide mailing lists. So, we have umbrella lists that distribute to other areas of the company in other parts of the world. So, a list like "listname@ourdomain.com" would be an umbrella for: "listname-us@ourdomain.com", "listname-uk@ourdomain.com", and so on. We've just started doing this, and myself and the administrator working on this quickly became annoyed that the subject lines ended up looking like: Subject: [listname-us] [listname] Test message
So, I modified MailList.py a bit so that it not only checks for subject_prefix in the subject, but also all of the acceptable_aliases for the list. So, now when a message is posted to listname, it gets resent to listname-*; while the subject remains as "Subject: [listname] Test message". The patch for this follows.
If anyone cares to now fix the little problem of the footer being added by both lists, I'd like to see the patch for that. Its a minor annoyance, but one I can live with for the time being. -Dan
stripped
is a user supplied regexp,
+ # which could be malformed.
+ if stripped and re.search(stripped, subj, re.I):
+ return 1
+ except re.error:
+ # `stripped' is a malformed regexp -- try matching
+ # safely, with all non-alphanumerics backslashed:
+ if stripped and re.search(re.escape(stripped), subj, re.I):
+ return 1
+ return 0
+
def parse_matching_header_opt(self):
"""Return a list of triples [(field name, regex, line), ...]."""
# - Blank lines and lines with '#' as first char are skipped.
***************
*** 1306,1313 ****
prefix = self.subject_prefix
if not subj:
msg.SetHeader('Subject', '%s(no subject)' % prefix)
! elif prefix and not re.search(re.escape(self.subject_prefix),
! subj, re.I):
msg.SetHeader('Subject', '%s%s' % (prefix, subj))
if self.anonymous_list:
del msg['reply-to']
--- 1328,1334 ----
prefix = self.subject_prefix
if not subj:
msg.SetHeader('Subject', '%s(no subject)' % prefix)
! elif prefix and not self.HasPrefix(msg):
msg.SetHeader('Subject', '%s%s' % (prefix, subj))
if self.anonymous_list:
del msg['reply-to']
On Thu, Sep 23, 1999 at 08:51:17AM -0500, Dan A. Dickey wrote:
If anyone cares to now fix the little problem of the footer being added by both lists, I'd like to see the patch for that. Its a minor annoyance, but one I can live with for the time being.
I haven't worked with umbrella lists, but it would seem that the obvious solution would be to remove the footer and the subject tag from either the listname server or the listname-(us|uk|whatever) lists. Is there something wrong with this?
The structure of a system reflects the structure of the organization that built it. -- Richard E. Fairley Sean Reifschneider, Inimitably Superfluous jafo@tummy.com URL: http://www.tummy.com/xvscan HP-UX/Linux/FreeBSD/BSDOS scanning software.
Sean Reifschneider wrote:
On Thu, Sep 23, 1999 at 08:51:17AM -0500, Dan A. Dickey wrote:
If anyone cares to now fix the little problem of the footer being added by both lists, I'd like to see the patch for that. Its a minor annoyance, but one I can live with for the time being.
I haven't worked with umbrella lists, but it would seem that the obvious solution would be to remove the footer and the subject tag from either the listname server or the listname-(us|uk|whatever) lists. Is there something wrong with this?
The problem then is that mail sent to one or the other of the lists does NOT get the footer added. I.E., when a message gets sent to "listname", I want the prefix [listname] added, and the footer for listname. This message would be directed to listname-* at that point, and I don't want listname-us adding a prefix or a footer. Also, I want a message directed at "listname-us" to get the [listname-us] prefix added, and listname-us's footer. I'm not sure where the term "umbrella" list came from, but it seems to me I'm looking more for a "waterfall" effect here - the first list the message is directed at gets to do its thing and others just pass it on to the list members with no modification.
-Dan
On Thu, Sep 23, 1999 at 02:51:06PM -0500, Dan A. Dickey wrote:
effect here - the first list the message is directed at gets to do its thing and others just pass it on to the list members with no modification.
Hmmm. One could set a flag to disable adding the footer if it doesn't add the subject tag, but then you wouldn't get it on replies either. What about having another option in the list which you could specify if we receive a message from would then bypass the message re-writing?
A ship in port is safe, but that is not what ships are for. -- Rear Admiral Grace Murray Hopper Sean Reifschneider, Inimitably Superfluous jafo@tummy.com URL: http://www.tummy.com/xvscan HP-UX/Linux/FreeBSD/BSDOS scanning software.