The information is now available out-of-band (has to be, since the mail
has to get delivered); so assuming procmail is the delivery agent, isn't
there a reasonably simple method of procmail grabbing that out-of-band
address from sendmail thorugh a variable, should one desperately need it for
some inexplicable reason or another? It would require an additional check on
the variable (just checking TO wouldn't cut it), but wouldn't something like
that solve Mr. Cox's problem?
As you said, once the message reaches the LDA (procmail) all envelope
information is lost. If you have control over your MTA, you can probably
configure it to add these to headers. For example, with sendmail you can
to your sendmail.cf file to add X-Envelope-From: and X-Envelope-To:
headers, which you can then use for your procmail recipes.
procmail mailing list