Re: balsa+libesmtp bug



On Fri,  4 May 12:31 Carlos Morgado wrote:
| 
| If the mta accepts the Bcc: addr but gives an error on the To: 
| balsa+libesmtp considers the message well delivered.

In SMTP, the protocol does not distinguish between To:/Cc: and Bcc:
recipients.  In general, recipients listed in the message headers
are unrelated to recipients listed in the RCPT TO: command.

An MTA will return a successful status to the DATA command as
long as it can deliver to *any* of the recipients listed in the
RCPT TO: commands, i.e at least one RCPT command had a 2xx response.

| The reply codes to each rctp to: command are not being parsed
| correctly

The reply codes *are* parsed correctly.  This is fundamental
to the correct operation of the SMTP client.

| and balsa+libesmtp believes blindly the "250 message accepted" code.

At present, Balsa cannot handle resending only the failed recipients
of a message.  The smtp_option_require_all_recipients() API is a
quick hack for Balsa's benefit and was intended to abort the session
if *any* recipients were rejecetd by the SMTP server.

The bug is actually in the implementation of
smtp_option_require_all_recipients() which complicates the protocol
engine more than I'd like if done properly.

I would prefer that Balsa handled this situation rather than have the
smtp_option_require_all_recipients() API which is amazingly ugly.
I'd really like to remove this API rather than fix it.

One possibility that comes to mind is to record recipient status in
messages in the outbox and only send to recipients that have either
not been tried previously or have a transient failure (4xx) recorded
against them.  Finally, the message would be removed from the outbox
to the sentbox only when all recipients are accepted.

It occurs to me that a better solution to this problem than
smtp_option_require_all_recipients() is to add a new API that enumerates
outstanding recipients of a message, along the lines of
smtp_enumerate_recipients().  This API could be used to create, say,
an X-Envelope-Recipient: header in outbox messages which could be used
to generate the recipient list for a message when the user attempts to
resend it to the failed recipients.

Thoughts anyone?

regards
Brian Stafford




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