procmail
[Top] [All Lists]

Re: Else rules

2002-03-22 16:49:23
Scott almost coded:
#
# :0
# * ^From.*
# {
#   :0 f
#   * ? formail -x"From" -x"From:" -x"Sender:" | egrep -is -f
/etc/procrcs/wanted.lst
#   | formail -A "X-NoBounce: On Wanted List"
#
#   :0 E
#   {
#      :0
#      * ? formail -x"To" -x"To:" | egrep -is -f /etc/procrcs/receive.lst
#      | formail -A "X-NoFilter: Does not want filtering"
#   }
#   :0 E
#   {
#     INCLUDERC=/etc/procrcs/ruleset.rc
#   }
# }


I think that the 2nd (=last) 'else' has no real 'if'.
This might do what you want:

:0
* ^From.*
{
  :0 fhw
  * ? formail -x"From" -x"From:" -x"Sender:" | egrep -is -f
/etc/procrcs/wanted.lst
  | formail -A "X-NoBounce: On Wanted List"

  :0 E fhw
  * ? formail -x"To" -x"To:" | egrep -is -f /etc/procrcs/receive.lst
  | formail -A "X-NoFilter: Does not want filtering"

  :0 E
  {
    INCLUDERC=/etc/procrcs/ruleset.rc
  }
}

The 'h' in the 'fhw' is default, but I think that you need the 'w'.
See also 'man procmailrc'.

Ruud


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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