Re: [RFC] : correct handling of sent mails



Hi,

not the recipient gets two copies, the sentbox does. Currently, mail is 
first queued to the outbox, and copied to the sentbox at that time. Later 
it gets sent out through smtp.

The proposal is to copy the mail to the sentbox when it's actually given to 
libesmtp and sent successfully. This is the correct behavior.
However, the function to send mail is in libbalsa, IIRC. The copy to 
sentbox operation would also need to be moved to libbalsa.
The email is then given to libbalsa with Bcc: stripped, this will create 
one copy of the mail in the sentbox. It is then given to libbalsa again, 
with bcc: intact. That would create the second copy.
Libbalsa has no way to know for sure if an email given to it has been sent 
already and only the bcc recipient's copy is being sent. That information 
would, to be reliable, have to be passed to libbalsa a well. That will 
change the API footprint.
IMHO simply not saving a copy if a Bcc: header is present is too 
simplistic, it will not work if some desktop user adds the same users to 
To: and Bcc:. In this case, a stripped version would _not_ be sent at all, 
so if messages with a bcc: header are not saved, the message would never be 
copied to the sentbox.

I also see yet another problem in this approach: Imagine that the 
submission of one of the two versions fails, for some reason. Should the 
message be considered sent, therefore be in the sentbox, or should it be 
requeued, therefore be in the outbox? If it's copied to the sentbox, then 
moved back to the outbox, it would be saved in sentbox once more on the 
(sucessful) submission retry.

There really ought to be state information associated with the message to 
indicate if it's been copied to the sentbox. But then imagine it's pulled 
back from the sentbox to the draftbox and re-sent unaltered. There really 
should be another copy saved in the sentbox, since the message was actually 
sent twice, but if the state info says it's already saved, this wouldn't 
happen.
Doing this one right is far from trivial, except in the simple case (one 
recipient, no bcc)

Melanie

On 2002.09.04 00:26 Willem Riede wrote:
> Bcc recipients shouldn't get their copy until the message leaves the
> outbox
> i.e. given to libesmtp resp. copied in sentbox. I don't see why that would
> 
> give them two copies.
> 
> Regards, Willem Riede.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]