procmail
[Top] [All Lists]

Re: Configuring Vacation Message for One Address

2005-08-20 10:30:54
On Sat, Aug 20, 2005 at 11:59:22AM -0400, Gerard wrote:

I am really new to using procmail. Presently, I have several
email addresses that I use for various purposes. I wanted to use
the following recipe that I copied from the 'man procmailex'
file. Replacing the "your(_at_)own(_dot_)mail(_dot_)address" works fine; 
however,
the filter works on every email address I have. I want it to
responde to only one particular address. If I change the

* $^:.*\$LOGNAME\> line to

* $^To:me(_at_)someplace(_dot_)net\<\$LOGNAME\>

the recipe no longer works. The log file claims that there is no
match.

It doesn't work because that's not how the To: header
actually looks most of the time.

Does your mail come with no space after "To:", then either no "<"
symbol or no space before $LOGNAME?  Because that's what you've
told procmail to look for. ("\<" does not mean "<"; it means a char
not of the class '[a-zA-Z0-9_]', per "man procmailrc".)  Also,
$LOGNAME won't usually be in that position in the line following an
email address.

For example, if I want to create a regex to look for mail matching
this:

    To: Dallman Ross <dman(_at_)nomotek(_dot_)com>

I could do this:

    * ^To: Dallman Ross <$LOGNAME(_at_)nomotek\(_dot_)com>

But if the spacing is different, or the mail comes
with quotation marks around my name (soft or hard),
or a different addressing scheme is used, I won't match.

But anyway, you seem confused, because it seems you want to
test for the sender, not for the recipient.  You want to
reply if the mail comes from one particular person.  So
you want an addition condition.  You don't need to change
the one in the man pages; you just need to add a condition.
I'd put it first, since most mail will not be from this party.

   * ^From:.*\<friend(_at_)address\(_dot_)dom\>

Dallman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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