in reply to Determining who the email is meant for

You're looking for the "envelope to" which is not contained in any way inside the mail message in a guaranteed way, although some MTAs rewrite some of the delivery headers to include it as part of the information.

This is the reason I worked with Joe Pruitt at Teleport to create the "procmail hack" for sendmail (now part of the distro) that permits procmail to access the "envelope to" as $1.

But if you're looking at it already delivered in a mail box, you've lost. You'll have to get to the message further upstream.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Determining who the email is meant for

Replies are listed 'Best First'.
Re: Re: Determining who the email is meant for
by BMaximus (Chaplain) on Nov 26, 2001 at 03:45 UTC
    I have complete control over the server ... I think :). So to use this procmail hack do I need to recompile sendmail or add something to sendmail.cf or the mc file and re-m4 the sendmail.cf file?

    BMaximus