procmail
[Top] [All Lists]

The dynamic Mr. Whitcomb's question (was: Procmail (fwd))

1998-02-06 09:13:53
On Fri, 6 Feb 1998 14:43:01 -0500 (EST), Roger Whitcomb
<rcw(_at_)css-trident(_dot_)theplanet(_dot_)co(_dot_)uk> wrote:
Hi, can anyone help, I need to set up a procmail recipe that will forward
emails to a particular user if the address of the email is correct but the
user the email was sent to doesn't exist. How can I do this?

You already sent this question once. You are not seeing any replies
because your reply address bounces. As a matter of fact, it could also
be because nobody understands your question. Please try again with a
valid return address, a better formulation of your question, and a
slightly less inane Subject header.

/* era */

Here's my bounced original reply:

------- Start of forwarded message -------
From: era eriksson <era(_at_)iki(_dot_)fi>
To: Roger Whitcomb <rcw(_at_)css-trident(_dot_)theplanet(_dot_)co(_dot_)uk>
Subject: Re: Procmail

On Thu, 5 Feb 1998 12:17:59 -0500 (EST), Roger Whitcomb
<rcw(_at_)css-trident(_dot_)theplanet(_dot_)co(_dot_)uk> wrote:
Hi, can anyone help, I need to set up a procmail recipe that will forward
emails to a particular user if the address of the email is correct but the
user the email was sent to doesn't exist. How can I do this?

What do you mean??

If you mean, the address is syntactically correct for delivery to
domain.com, but user(_at_)domain(_dot_)com doesn't exist:

    :0
    * ^TO\<\/[^(_at_)]+@domain\.com
    {
        :0
        * MATCH ?? ^^\/[^(_at_)]+
        * ! ? test -e /var/spool/mail/$MATCH
        ! otheruser
    }

This is probably not something you really want. Because you could
still receive mail for your domain which doesn't contain anything that
matches the ^TO expression above, which is not for a particular user.
The short version of the long answer is, don't use Procmail for
delivery. You can use fetchmail or uucp to get your mail instead, that
way you can deliver based on the envelope information, which is the
last word on who the message is for (and which Procmail can never get
a chance of seeing, unless you're running procmail as your local MDA
from inside Sendmail or similar, but if you had that you'd presumably
already be handling this via Sendmail). 

And please try to use a reasonably detailed Subject: header on
messages to the list. It would be fairly odd for a message to
Procmail-L to +not+ be about Procmail, right?

/* era */

- -- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>
-------- End of forwarded message --------
-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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