[Techtalk] Procmail spam recipes (was simple mail filtering via
whitelist)
Alain Tesio
alain at onesite.org
Tue Mar 9 23:05:29 EST 2004
On Mon, 8 Mar 2004 16:31:22 -0800
Akkana Peck <akkana at shallowsky.com> wrote:
> I could grep the body of the message, but grep isn't smart enough to
> pick out patterns like
>
> Content-Type: application/octet-stream;
> name="document.pif"
You can process it with a little awk script first to merge such lines :
awk 'BEGIN {x=0}
/Content-Type: .*name=/ { print $0; }
/Content-Type: application\/octet-stream;$/ { printf "%s", $0; x=1 ; next}
{ if (x==1) { print $0; x=0; } }'
Alain
More information about the Techtalk
mailing list