procmail
[Top] [All Lists]

Re: formail and Apparently-To:

1999-06-05 04:17:09
On Sat, 5 Jun 1999 02:22:34 -0500, Casey Zacek <casey(_at_)netcomi(_dot_)com>
wrote:
James McGill spoke forth with the blessed manuscript:
On Fri, 4 Jun 1999, Philip Guenther wrote:
Or better yet, don't tell sendmail to scan the header for receipients.
Instead, put the one recipient on the sendmail command line.  That way
the only change to make to the header is the addition of the X-Loop:
line:
  |formail -A"X-Loop: mark(_at_)box(_dot_)com" | \
          $SENDMAIL $SENDMAILFLAGS juan(_at_)box(_dot_)com
We tried that, but what about for multiple recipients? We ran into
line length limitations, if I recall correctly, which was the
reason for having sendmail look for recipients in the header.
But Apparently-To: fields in the DATA are not really headers,
are they?  Admittedly, we are doing insane things with procmail...
In the qf* file in the mqueue/ directory, they had both RPFD:<addr>
and HApparently-To: <addr>.
This leads me to believe that sendmail thought they were headers.
(the H in particular)
Anyhow, like i mentioned to James before, formail was spawning many
many 'sendmail -oi -t' processes from the email. I suggest that
perhaps our (old? it doesn't tell want to me) version of formail is
to blame for lots of this.

These comments sound like you are confused about what "headers" are.
They are part of the actual message and comprise the first lines up to
the first blank line in the DATA. This is what Sendmail is looking at,
this is what formail is looking at, this is how it works.

I imagine you are getting mixed up with the envelope recipient data
(the RCPT TO: address), which is probably lost forever by the time you
are trying to figure out who you should be delivering this message to.

So sendmail -t is looking at the stuff up to the first blank line (the
lines which appear with H:s in the qf file, correct) and looking for
lines starting with "To:", "Cc:", etc. One of these expressions is
Apparently-To: (case insignificant) and if that's found, the message
is sent to that address. (It's a bit more involved than this, because
e.g. the presence of Resent-To: overrides any To: headers etc.)

If you don't want that to happen, you probably need to list the
recipient explicitly on sendmail's command line.

If you want that address to be the original envelope recipient
address, you need to be doing something differently, or rethink your
whole approach. The FAQ has some more information about this whole
issue; see <http://www.iki.fi/era/procmail/mini-faq.html#advanced>

Hope this helps,

/* era */

(Netscape is broken and will misplace the #advanced part after going
through the redirector at www.iki.fi -- if that happens, just complete
the URL you end up looking at in the Location: box with #advanced and
hit Enter.)

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

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