SMTP client
- From: Brian Stafford <brian stafford office-logic com>
- To: balsa-list gnome org
- Subject: SMTP client
- Date: Thu, 23 Nov 2000 11:01:31 +0000
Hi all,
I've just downloaded and built the version of Balsa from CVS.
I use remote IMAP and SMTP servers for handling my mail, unfortunately
though, Balsa does not seem to work too well in this scenario.
IMAP was fair once I figured out how to configure it, but I can't send mail.
Having looked over the SMTP client code, several show stopping problems
became apparent with it.
* The HELO command specifies the domain name of the SMTP server. According
to RFC 821, the HELO command identifies the SMTP sender to the SMTP receiver.
The domain name should therefore be that of the local host. RFC 1123 states
that the domain parameter in a HELO command is a "valid principal host
domain name for the client host". Furthermore, RFC 1123 section 5.2.2 states
that all domain names in the SMTP protocol are to be fully qualified prinicpal
names or domain literals, i.e. thay identify a host directly or are an MX
name. CNAMES may not be used.
Modern clients wishing to use SMTP extensions should start with the EHLO
command and check the response to enambe the extensions supported by the
client, see RFC 1869.
* SMTP servers can send multi-line responses - this is permitted for any
command by RFC 821 but Balsa does not handle this in smtp_answer().
* The smtp_answer() function checks only for a small number of possible reply
codes, not even as many as are enumerated in RFC 821. This simply will not
work - RFC 821 specifies (Appendix E), in summary,
2xx means successful completion of the operation
3xx is an intermediate status indicating that the client should
proceed with the remainder of the operation. Final success or
failure is indicated with a further status code on completion.
4xx means transient failure. The operation may succeed at a later time
5xx means permanent failure. The operation will not succeed later.
All other responses are illegal.
A better approach would be something like
status = atoi (buf);
switch (status / 100)
{
case 2: /* proceed to next stage of protocol */
case 3: /* can only happen for DATA or an SMTP extension
- does not indicate success */
case 4: /* handle transient failure */
case 5: /* fail operation */
default: /* handle a protocol error */
}
* No SMTP extensions are implemented - this means that, for example, SASL
(RFC 2222, 2554) cannot be used to authenticate to the SMTP server.
Similarly STARTTLS cannot be used to negotiate a secure connection. It
means that DSNs cannot be requested. In short all the facilities expected
from a modern SMTP server are unusable.
As indicated above RFC 821 is substantially updated by RFC 1123, RFC 1869 and
many others. I'd be amazed if the existing SMTP client works other than with
a few specific SMTP servers, if at all.
Is anyone working on this code? I could probably submit patches for some
of the issues but I don't have much free time and this situation is likely
to continue until at least the new year. I don't want to duplicate
any current effort in this area, however I'd be willing to contribute
when time permits or at least review any code changes in the SMTP client.
I hate to be so negative but of all the open source mail clients I've tried
to date, Balsa seems the best. As it stands, however, it is unusable for me.
Regards
Brian Stafford
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]