Re: FW: [Exim] BCC list at first MTA in chain - Any list, tw…

Top Page
Delete this message
Reply to this message
Author: David Woodhouse
Date:  
To: Boyle Owen
CC: Exim list
Subject: Re: FW: [Exim] BCC list at first MTA in chain - Any list, two MTAs in series..
On Mon, 2003-03-10 at 08:33, Boyle Owen wrote:
> >-----Original Message-----
> >From: David Woodhouse [mailto:dwmw2@infradead.org]
> >
> >I think the original sender was confused and thinks that the actual
> >presence of a Bcc header in the body of the mail bears some relation to
> >the destination of that mail
>
> Maybe I can rephrase the question: If my MUA generates a mail with a
> list of N destination addresses (in a To or BCC or CC list), then at
> some stage, an MTA has to loop over the addresses and send the mails to
> their destinations (i.e. at some stage, N mail transfers have to take
> place). My question is, if there are two MTAs in series, at which one
> does the looping take place?


Neither. Under normal circumstances _NO_ MTA will look at the addresses
in the To: Cc: and Bcc: headers of the email. Those are purely cosmetic.
They should never be used to make inferences about the actual recipients
of a mail, nor used for filtering, etc.

You said (IIRC) that your mail is sent from your CGI scripts with SMTP
(to localhost:2525). Whatever it is that _makes_ that connection to Exim
running on localhost is giving SMTP 'RCPT TO:' commands which identify
all of the recipients, before giving the SMTP 'DATA' command with the
mail. It should also ensure that there's no 'Bcc:' header in the body of
the mail itself -- Exim will _not_ strip it and shouldn't be expected
to.

Consider the following input to your first Exim:

    MAIL FROM:<someform@yourwebdomain>
    RCPT TO:<arecipient@anotherdomain>
    RCPT TO:<brecipient@anotherdomain>
    RCPT TO:<crecipient@yetanotherdomain>
    DATA
    To: Complete lies here <SomeFakeAddress@???>
    Cc: More lies here <AnotherFakeAddress@???>
    Bcc: Even more lies here <Fake@???>


...

That will get sent on _only_ to the three addresses given in the
'RCPT TO:' commands, and _not_ to any of the addresses listed in the
cosmetic 'To:' 'Cc:' or 'Bcc:' headers. The Bcc header will _not_ be
stripped. Your first Exim is likely to send it to the second
public-facing Exim as configured, in a single SMTP transaction with
multiple 'RCPT TO:' commands just as shown above.

Your second Exim is likely to make two SMTP connections to deliver the
mail. One to the MX host for 'anotherdomain', over which it will deliver
the mail with two 'RCPT TO' commands for the two recipients at that
domain, and one connection to 'yetanotherdomain' to deliver to the third
listed recipient.

Lest I mislead -- note that Exim 'does' have a mode of invocation where
it _will_ look at the addresses in the cosmetic headers and strip Bcc
(and generally behave like an MUA instead of an MTA). That's when you
run it from the command line with the '-t' option, but you're not using
that so do not let it confuse you.

I was going to explain this in more detail last time but after going
back to your original message to reply, I decided I couldn't be bothered
to help you because your pointless and idiotic disclaimer offended me.
Having seen how tenuous a grasp SWX has on legal matters relating to
email, I would never want to deal with them. Seriously, if your company
is so clueless they insist on adding such crap, get a webmail account or
something.

--
dwmw2