procmail
[Top] [All Lists]

Re: subject change via procmail

1997-09-17 16:23:11
"Alan K. Stebbens" <aks(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com> writes:
Yes.  Read the man page of "procmailrc" to understand the syntax of the
recipe file below, which implements what you would like to do:
...
   :0
   * ^To:(.*\<)?Dave(_at_)Global-OWL\(_dot_)com
   { TAG=dave(_at_)go }
...
To cause this procmail filter to be invoked, you can set up your aliases
like this (assuming that you are using sendamil):

dave:    "|/usr/local/bin/procmail -m /usr/local/etc/tagit.rc"
...

Hmm, I think it would be much better to use the envelope recipient and
not the header recipient.  To do that the alias(es) will need to be
modified to pass the needed information into the procmail script:

dave:   "|/usr/local/bin/procmail -m /usr/local/etc/tagit.rc dave"


Then in tagit.rc you would instead say:

        ARG = $1

        :0
        * ARG ?? ^^dave^^
        { TAG = dave(_at_)go }

        :0
        * ARG ?? ^^somethingelse^^
        { TAG = somethingelse(_at_)go }


This method will work even if someone Bcc:s a message to
dave(_at_)Global-OWL(_dot_)com(_dot_)


Philip Guenther

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