Re: tcllib mime smtp proc sends BCC mail copies as attachments
- From: "tom.rmadilo" <tom.rmadilo@xxxxxxxxx>
- Date: Sun, 13 Jan 2008 09:50:42 -0800 (PST)
On Jan 13, 3:13 am, Pat Thoyts <cnggub...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
There is a bug here. If it gets raised as a bug - or someone provides
a patch then it will get fixed.
Is there a better place to discuss the issue? Although buggy, any
change will now introduce changed behavior. I never advocate
supporting bugs, but email is somewhat sensitive. Input from those
relying on current behavior might help.
SMTP has no BCC support explicitly. The package should send the same
body to each recipient in the BCC list as for the TO list. The only
difference should be that for the BCC list we reset the SMTP session
and issue a new MAIL TO so that noone else sees the list of BCC'd
recipients.
Given some of the other limitations/requirements of the SMTP protocol,
this seems like a brief outline of the steps and what should be sent
(most of this is already done I think, I'm just explaining my
thoughts, not teaching anyone, please correct any errors)
First, not just the body, but the full TO and CC headers should be
sent to each recipient. This is simply the stuff after the DATA verb.
This 'stuff' should be the same to everyone. The smtp proc reads an
original message which includes the TO/CC and BCC headers and
transforms this into the actual message to send, it might add headers,
and it removes the BCC header.
1. read original message and create list of primary recipient,
secondary recipients and bcc recipients. (and figure out MAIL From).
2. finalize the text of the actual message (leaving intact the TO and
CC headers, removing BCC, adding any additional stuff.
3. contact the smtp server to send the actual message. It may take
more than one envelope to send to all recipients (some servers limit
RCPT per envelope), but each 'session' goes something like this:
MAIL From:<from@xxxxxxxxxxx>
RCPT To:<primary@xxxxxxxxxxx>
RCPT To:<secondary-1@xxxxxxxxxxx>
....
RCPT To:<secondary-n@xxxxxxxxxxx> (check for server rejecting due to
too many rcpt)
DATA
(actual message)
..
RSET
Mail From: ....
The same loop can be done for the BCC recipients. RSET may not be
required for some servers, but it is more universally used to clear
the RCPT list.
It shouldn't be absolutely necessary to separate the BCC recipients
from named recipients since none of the RCPT lines show up in the
message. The only potential for problems is if the server records the
list and somehow associates any reply as going to everyone on this
list. This would be very bad behavior, and the only way around it
would be to send each BCC recipient a message with a clean envelope
(just one RCPT line). I would actually recommend anyone handling
sensitive email lists to verify how their clients and servers work,
before something unexpected happens. (Like a congressional staffer
sending a CC to all whistle-blowers, very nice!) CC is, in fact, the
bigger problem, which is why BCC must work correctly.
.
- References:
- tcllib mime smtp proc sends BCC mail copies as attachments
- From: dhogaza
- Re: tcllib mime smtp proc sends BCC mail copies as attachments
- From: tom.rmadilo
- Re: tcllib mime smtp proc sends BCC mail copies as attachments
- From: dhogaza
- Re: tcllib mime smtp proc sends BCC mail copies as attachments
- From: tom.rmadilo
- Re: tcllib mime smtp proc sends BCC mail copies as attachments
- From: Pat Thoyts
- tcllib mime smtp proc sends BCC mail copies as attachments
- Prev by Date: Re: Who designed that [dict] command anyway?!? [Was: Core commands as ensembles...]
- Next by Date: Re: tcllib mime smtp proc sends BCC mail copies as attachments
- Previous by thread: Re: tcllib mime smtp proc sends BCC mail copies as attachments
- Next by thread: ANN: tkpath 0.2.8
- Index(es):
Relevant Pages
|