Request for Question Clarification by
sycophant-ga
on
05 Jul 2003 20:23 PDT
Hi hooji,
I am a little confused by the situation you describe. The way email
operates, CC and BCC only exist in the header of the email. Regardless
of what the CC in an email header says, no email server will try to
deliver it.
If I were sending an email with the following headers from my
computer:
To: joebloggs@someisp.com
CC: someotherguy@aol.com
Then when I hit send in my email client it will connect to my ISPs
SMTP server, which is configured to relay all mail received from it's
own users, for anywhere.
My ISP would get it, and analyse the message envelope, not the
headers, and determine that the email was to be delivered to a user at
someisp.com and a user at aol.com. It would then connect to the
advertised mail server for each domain name, and pass the email on to
that mail server. That mail server would look at the envelope to
address (still not the headers of the message) and deliver the email
as necessary.
If your mail server is configured not to relay (fairly simple in
Sendmail) then it simply won't. Sendmail will never look at the
headers of the message to determine what to do with an email, they are
not trusted. It takes all the information it needs from the
communication it has with the mail server or client that it received
the email from.
The only part of your mail chain that might look at the headers is the
MUA - either the user's email client, or user-level mail software such
as Procmail.
Your server, should never, under any circumstances, regardless of CC
headers, deliver mail from outside it's own network to any domains it
it not configured to handle.
To test this, and also the lack of relation about the headers, try
this - telnet to your mailserver from a machine it doesn't trust, on
port 25, and engage in the followin exchange. (SMTP server lines
indicated by an *, everything else is your input)
*220 foo.com ESMTP Sendmail 8.9.3/8.8.7
helo (your ip address)
*250 foo.com Hello hostname [ip address], pleased to meet you
mail from: random@aol.com
*250 2.1.0 random@aol.com... Sender ok
rcpt to: youraddress@foo.com
*250 2.1.5 youraddress@foo.com... Recipient ok
rcpt to: john@anotherisp.com
*550 5.7.1 john@anotherisp.com... Relaying denied. (It should be
something like this)
*354 Enter mail, end with "." on a line by itself
To: youraddress@foo.com
From: random@aol.com
CC: john@anotherisp.com
Subject: A test message
This is the first line.
.
*250 2.0.0 h663CG8O028002 Message accepted for delivery
The fact that it denies the RCPT command to another ISP means that it
will not deliver to that address, regardless of what the mail headers
say.
However, it might be a good idea to get a newer version of Sendmail if
you can, 8.9.3 is fairly old.
Try the above, and check your mail logs (sorry, I can't remember quite
where they are on RedHat) - but I don't actually think your server is
relaying to the CC addresses. That's just not how email works.
If this is a bit rambling for you, or if you want to know more, let me
know. Also, if you are still unsure I might be able to give you some
things to try anyhow.
Also, check the following RFCs, they define the way email is handled:
http://www.faqs.org/rfcs/rfc2821.html RFC2821 SMTP
http://www.faqs.org/rfcs/rfc2822.html RFC2822 Internet Message Format
Regards,
Sycophant-ga