postmaster a �crit :
> Is there an easy way to add a subject tag like the "[xmail]" one on the 
> subject of this list's messages? I have a list user created, but don't want 
> to implement a complete list manager like Ecartis or Majordomo yet.

I wrote a bash script to do something like this. It takes the left 
part of the E-mail address of the ML as a tag and adds it to subject 
if it's not yet there (to avoid redondant tags):

It's in a file named /var/MailRoot/filters/MLtags.sh

*****Script starts next line
#!/bin/sh
#Filip Supera 2004
tag=${2/[EMAIL PROTECTED]
grep -i "^Subject:.*\[$tag\]" $1
res=$?
if [ $res == 0 ]; then
        grep -i "^Subject:.*$tag" $1
        res=$?
fi

if [ $res == 0 ]; then
        exit 16
else    
        sed s/"^Subject:"/"Subject: [$tag]"/ $1>$1.new
        mv -f $1.new $1
        exit 23
fi
*****End of script


In /var/MailRoot/filters/MLtags.tab, I have this line :

"/var/MailRoot/filters/MLtags.sh"<Tab>"@@FILE"  <Tab>"@@RCPT"


In /var/MailRoot/filters.in.tab I have this on one line :

"*"<Tab>"[EMAIL PROTECTED]"<Tab>"0.0.0.0/0"<Tab>"0.0.0.0/0" 
<Tab>"MLtags.tab"

Hope it helps !
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to