Re: [RFC] : correct handling of sent mails



On 2002.09.03 18:44 M. Thielker wrote:
> 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)
> 
IMHO all actions to get the message anywhere other than in outbox should be
postponed until we are online and sending the mail that was queued is
attempted. At that time the two submissions, for To's and for Bcc's should 
be done, and when successful, the message should be removed from outbox and
moved to sentbox. I admit not knowing what the impact on the code is.

Reagrds, Willem Riede.



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