Re: tcllib mime smtp proc sends BCC mail copies as attachments



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.
.



Relevant Pages

  • Re: SPF = Sender Policy Framework
    ... >RCPT TO: somebody@domain2 ... This is where those two problems come up: BCC and Groups/Mailing ... Lists. ... functionality as described in RFC 822, RFC 2821, etc. ...
    (comp.os.linux.misc)
  • Re: SPF = Sender Policy Framework
    ... >RCPT TO: somebody@domain2 ... This is where those two problems come up: BCC and Groups/Mailing ... Lists. ... functionality as described in RFC 822, RFC 2821, etc. ...
    (comp.os.linux.security)
  • Re: Sending e-mail to entire address book?
    ... it needs only one of these recipients to be ... spammers' lists. ... the resulting mail window from the TO: field to the BCC: field and add ... When the malware spammers use ...
    (comp.sys.mac.misc)
  • Re: Sending e-mail to entire address book?
    ... it needs only one of these recipients to be ... spammers' lists. ... the resulting mail window from the TO: field to the BCC: field and add yourself to the TO: field... ...
    (comp.sys.mac.misc)
  • Re: Maximum number of send to addresses
    ... automatically sending an e-mail to a large group without including the large ... > number of recipients at a certain point. ... > you create one or more distribution lists and send it to the list or BCC ...
    (microsoft.public.outlook.general)