procmail
[Top] [All Lists]

Re: newbie: forwarding

1999-05-06 01:43:04
Arunas Norvaisa wrote:

:0:
* ^Subject:*test*
/dev/null

:0
* ^*
! my(_at_)address(_dot_)here

</quote>

 BUT  instead  of  deleting  mail  with  subject 'test', my account is
forwarding ALL mail to me... What a heck???

You're dealing with regular expressions here, not with shell
patterns: "*" doesn't mean "anything" the way it does in a shell,
but it modifies the preceding expression to mean "any amount of
that" (including 0). Your first recipe only matches messages
that have the letters "Subject" at the beginning of a header
line, then any amount of colons, then the letters "tes" and
finally any amount of "t"s;  your test messages probably have
whitespace between the colon and the first "t", so they don't
match. Try
        :0
        * ^Subject:[    ]*test
        /dev/null
instead (the brackets contain a space and a tab). In general you
should be careful with sending messages to /dev/null, though,
because of the possibility of false positives; better send them
to some folder and check that one every now and then. 

To have the action in the second recipe performed for all
messages that make it there, just omit the condition line
entirely:
        :0
        ! my(_at_)address(_dot_)here

/HW

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