Hi, I was sick of those ads appended by free email services, so I wrote
this procmail recipe to remove them. I've tested it on a 3k message
mailspool and it stripped the advertisement off the tail of every message I
had from yahoo or hotmail (around 400). I went through the processed
spool's diffs and made sure it didn't go off the rails anywhere.
This method will also strip reply-chained ads, so "> > > Do You Yahoo!?"
is killed as well.
The method of extending this for other ad banners should be clear, and if
anyone does, I'd be happy to get a copy of your sed regex.
I'm still limiting the recipe by From:, so I do still see ads in replies from
other hosts, but I'll make it a blanket rule eventually.
:0 fbw
* ^From:.*@([^ ]\.)*yahoo\.com\>
| sed -E -f ${PROCDIR}/sed-yahoo.com
:0 fbw
* ^From:.*@([^ ]\.)*hotmail\.com\>
| sed -E -f ${PROCDIR}/sed-hotmail.com
sed-yahoo.com contains:
/^[> ]*_+$/{
$!N
$!N
$!N
$!N
N
/^[> ]*_+\n[> ]*Do You Yahoo!\?\n.*\n[> ]*http:.*yahoo\.com.*\n*/d
}
sed-hotmail.com contains:
/^[> ]*_+$/{
$!N
$!N
/^[> ]*_+\n[> ]*.*(MSN|Hotmail|Free).*\n*.*http:.*(msn|hotmail)\.co.*/d
}
Comments and suggestions welcomed,
Aaron
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail