On Sat, 3 Aug 2002, Hanspeter Roth wrote:
On Aug 04 at 01:39, Brad Forschinger spoke:
On Sat, Aug 03, 2002 at 05:12:08PM +0200, Hanspeter Roth wrote:
how can I delete the footer of the mailing list?
in my .procmailrc
:0fw
* ^To: (_dot_)*(_at_)yahoogroups(_dot_)com
| ~/.procmail/remove_yahoo_ads.pl
and remove_yahoo_ads.pl:
#!/usr/bin/perl
while (<>) {
last if /Yahoo! Groups Sponsor ---------------------~-->$/ or
/=====================================================$/;
print;
}
Shouldn't be too hard to do what you wanted using this as a guide!
--
Brad Forschinger <bnjf(_at_)optusnet(_dot_)com(_dot_)au>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Ok. The ads are most annoying. But I'd also like to delete the
unsubscribe info which also can be found in the headers when needed.
And I'd like to delete it with the separating bar and any blank
lines above the separating bar.
I would prefer sed which is probably faster to load then perl.
Something like this?
sed -e '/./{H;$!d;}' -e 'x;/unsubscribe from this/d;/Yahoo/d'
It will delete the paragraph which contains the strings
"unsubscribe from this" or "Yahoo".
[ Was tested on Solaris7 and sh(1) ]
[ Still crypted like perl, isn't? (:-) ]
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail