[ale] odd procmail answer

Joe Bayes jbayes at occs.cs.oberlin.edu
Sun May 30 23:56:41 EDT 1999


Nick Lucent typeth:
>On Sun, 30 May 1999, Joe Bayes wrote:
>
>> Nick Lucent typeth:
>> 
>> >Does anyone happen to know if there is a way to make procmail look at all
>> >the email I get from aol.com, and check the body to see if there is a
>> >bunch of aol headers and if so delete it? you know how aol messages show
>> >everyone that the email has been sent by? thats what I mean.
>> 
>> I don't know aol messages, but I use procmail and sed to delete the
>> munged reply-to addresses on another list I'm on.
>> 
>> :0
>> * Subject:.*\[lula\]
>> | /bin/sed -e /reply-to:/Id >lula.SPOOL
>> 
>
>now would this check the body, and if the email was "aolised" it would
>just delete it? or would that just check the headers of the email?

Actually, what the above does is it deletes any line which contains
the case-insensitive pattern "reply-to:", in both the body and the
headers of the message. 

Are you trying to delete the entire message, or just the lines which
contain the offensive aol stuff? Deleting the entire message shouldn't
be too hard...something like 
if (grep pattern file); then cat file >>mbox; fi

But I assumed that what you wanted was to only delete the lines. 

Is there a pattern or regexp that you know will be in any of the
unwanted lines, but you're reasonably sure will not be in any other
lines in the body or headers of the message? If so, then you want
something like I have above. (Replace the "reply-to:" with whatever
your pattern is, of course) If you don't know of a pattern, then this
probably won't help you much. 

--joe






More information about the Ale mailing list