procmail
[Top] [All Lists]

Re: procmail not matching

2002-06-08 19:49:27
On Sat, Jun 08, 2002 at 11:27:32AM -0700, Jim Gifford wrote:
I have corrected a few things. But I noticed it wasn't working, on the
yahoo, but for the linkline account.

This is due to faulty regexps.

Here is the To line from the Actual E-mail.
To: giffordj(_at_)linkline(_dot_)com, gifford_jim(_at_)yahoo(_dot_)com

Here is the procmail.log Info
procmail: No match on "^To: *gifford_jim(_at_)yahoo(_dot_)com"
procmail: Match on "^To: *giffordj(_at_)linkline(_dot_)com"
.
Here is my procmailrc file
.
:0:
* ^To: *gifford_jim(_at_)yahoo(_dot_)com
$MAILDIR.Yahoo/

:0:
* ^To: *giffordj(_at_)linkline(_dot_)com
$MAILDIR.linkLINE/

There are three problems here:
You're trying to match "the characters ('t' or 'T') AND ('o' or 'O') AND ':'
and any number of spaces followed by a string that looks like an email
address, anchored at the beginning of a line." Better would be to use
"^To:(_dot_)*giffordj(_at_)linkline\(_dot_)com" (note escaping of the . in 
.com). Even better
would be "^TO_giffordj(_at_)linkline(_dot_)com".
The second problem you have is that, given the To: line in your sample,
delivery will be made by the first recipe and the second recipe will never
even see it, even if your regexps were correct (and fixing the regexps, this
would still be the case if the input was "To: gifford_jim(_at_)yahoo(_dot_)com,
giffordj(_at_)linkline(_dot_)com".) You can fix this by adding a c flag to the 
first
recipe, but you still have the problem of what to do with the extra copy it
will create if the first recipe matches, but the second one does not.

Finally, you can not deliver to "$MAILDIR.Yahoo/" or "$MAILDIR.linkLINE/".
$MAILDIR is not just a variable, but must name a directory as procmail will
chdir into that directory before attempting delivery. "$MAILDIR/Yahoo/" or
"$MAILDIR/.Yahoo/" are ok (or even "Yahoo/" and ".Yahoo/", as procmail will
automatically prepend $MAILDIR/ to any non-absolute path.)


-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
I'll get my copy from the list.
_______________________________________________
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>