procmail
[Top] [All Lists]

Re: Flag to deliver autoresponse to the CC or BCC

1997-08-21 23:32:51
On Thu, 21 Aug 1997 09:41:24 -0700, Jeff Halper <jeff(_at_)ihot(_dot_)com> 
wrote:
Is there a flag to use in .procmailrc recipes to cause the autoresponse
messages to be delivered to the CC and/or BCC persons in the opriginal
address. Delivering to the "From" seems to work very well.

Procmail itself doesn't directly control any of this, so no, there is
no such flag. The address on an automatic reply is usually determined
by formail -rt; you can fool around with formail's options, or feed it
a stripped-down message. Here's what I did with yours, for a test:

 $ formail -XSubject: -XResent-From: | formail -rt
 To: procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
 Subject: Re: Flag to deliver autoresponse to the CC or BCC 
 
The original From: line, obviously, had your address on it, so that's
what would end up on the To: line in the reply normally. The first
formail will extract only the Resent-From and Subject and the second
one gets to generate the best reply header it can from that. What I'm
hinting at, then, is replacing -XResent-From: with -XCc: and seeing
how far that will take you. Bcc is, of course, usually another matter
entirely. You might want to read what the FAQ has to say about that.
(Here I go plugging it again.)
    <http://www.iki.fi/~era/procmail/mini-faq.html> 

If you don't like the idea of running two copies of formail just to
find the Cc: address if there is one (which is dangerous when there
isn't one), you might want to write your own script. A third
alternative might be to play around with renaming the original From:
field so that formail -rt will prefer Cc: over whatever the original
From: gets renamed to, but still find it if there is no Cc:
(unfortunately, you have to look at the source to find out how formail
prioritizes the various possible sender address fields).

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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