Differences between revisions 1 and 2
Revision 1 as of 2008-05-28 20:27:45
Size: 1530
Editor: terri
Comment:
Revision 2 as of 2008-05-30 14:21:50
Size: 1466
Editor: terri
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/4292609 #pragma page-filename DOC/versions/14352629
Line 5: Line 5:
(1) Find a suitable place for your script, and then make a file

{{{
   
like 'mylist.sed' containing:
}}}
(1) Find a suitable place for your script, and then make a file like 'mylist.sed' containing:
Line 19: Line 14:

{{{
    
(Change the SUBJECT_PREFIX to the subject prefix for your list)
}}}
(Change the SUBJECT_PREFIX to the subject prefix for your list)
Line 32: Line 24:

{{{
    
(Again, change the /PATH/TO's to a suitable value for your system)
    (Note that qmail users need to insert the 'preline' command between the pipe and the 'wrapper' command)
}}}
(Again, change the /PATH/TO's to a suitable value for your system)
(Note that qmail users need to insert the 'preline' command between the pipe and the 'wrapper' command)
Line 46: Line 35:
(Change this as you require)
Line 47: Line 37:
{{{
    (Change this as you require)
}}}

(5) Test by posting to the list with a subject line containing Re:'s and a [[../subject_prefixes|subject_prefixes]] and more Re:'s
(5) Test by posting to the list with a subject line containing Re:'s and a <<Verbatim([)>>subject_prefixes<<Verbatim(])>> and more Re:'s

3.12. How can I remove duplicate Re: markers from the Subject: field of messages?

I've managed to do this with a simple sed script.

(1) Find a suitable place for your script, and then make a file like 'mylist.sed' containing:

    ----- start of mylist.sed -----
    s/^Subject:\(.*\)\[SUBJECT_PREFIX\] /Subject:\1/
    s/^Subject: *\(Re: \)\+/Subject: Re: /
    ------ end of mylist.sed ------

(Change the SUBJECT_PREFIX to the subject prefix for your list)

(2) Make a file like 'mylist.sh' containing:

    ----- start of mylist.sh -----
    cat | sed -f /PATH/TO/mylist.sed | /PATH/TO/mailman/mail/wrapper post listname
    ------ end of mylist.sh ------

(Again, change the /PATH/TO's to a suitable value for your system) (Note that qmail users need to insert the 'preline' command between the pipe and the 'wrapper' command)

(3) Change the 'mylist.sh' script to mode 755 (executable)

(4) Change /etc/aliases or ~alias/.qmail-listname to be:

    | /PATH/TO/mylist.sh

(Change this as you require)

(5) Test by posting to the list with a subject line containing Re:'s and a [subject_prefixes] and more Re:'s

Last changed on Tue Aug 13 05:04:56 2002 by Phil Stoneman Converted from the Mailman FAQ Wizard

This is one of many Frequently Asked Questions.

MailmanWiki: DOC/How can I remove duplicate Re- markers from the Subject- field of messages? (last edited 2015-01-31 02:36:58 by msapiro)