procmail
[Top] [All Lists]

Re: Searching body of text

1996-10-14 15:09:44
  > How do I get procmail to search the body of a message for a list of stuff.
  > The list is going to be in a file (if necessary, it can be put into the
  > recipe file). The list also looks like this, but can be changed if
  > necessary. Thanks.
  > /\badd me\b/i
  > /\bdelete me\b/i
  > /\bremove\s+me\b/i
  > /\bchange\b.*\baddress\b/
  > /\bsubscribe\b/i
  > /^sub\b/i
  > /\bunsubscribe\b/i
  > /^unsub\b/i
  > /\buns\w*b/i
  > /^\s*help\s*$/i
  > /^\s*info\s*$/i
  > /^\s*info\s+\S+\s*$/i
  > /^\s*lists\s*$/i
  > /^\s*which\s*$/i
  > /^\s*which\s+\S+\s*$/i
  > /^\s*index\s*$/i
  > /^\s*index\s+\S+\s*$/i
  > /^\s*who\s*$/i
  > /^\s*who\s+\S+\s*$/i
  > /^\s*get\s+\S+\s*$/i
  > /^\s*get\s+\S+\s+\S+\s*$/i
  > /^\s*approve\b/i
  > /^\s*passwd\b/i
  > /^\s*newinfo\b/i
  > /^\s*config\b/i
  > /^\s*newconfig\b/i
  > /^\s*writeconfig\b/i
  > /^\s*mkdigest\b/i

Pipe it through "egrep -f"..

  :0 B
  * ? egrep -s -f regexps
  ACTION-IF-A-REGEXP-MATCHES-THE-MAIL-MESSAGE

  :0 E
  ACTION-OTHERWISE

___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com>      http://reality.sgi.com/aks

<Prev in Thread] Current Thread [Next in Thread>