Subject: Re[4]: smtp_mail() with a username, how?

From: Karsten Ballueder <[email-masked]>
Date: Thu, 1 Jun 2000 11:12:17 +0100 (GMT)

On Wed, 31 May 2000 09:51:46 -0700 (PDT) you wrote:

 > If you include linkage.c at the start of your application (which is
 > required of all c-client applications) then you should get all supported
 > drivers and authenticators lunk automatically.

I do include it, yes.

 > If you get a "no SMTP authenticators available" then either you aren't
 > including linkage.c, or the SMTP server doesn't support any of c-client's
 > supported authenticators (meaning that you have to write code to add
 > support for one of the ones that it does support).

But what happens is that smtp_open_full() never calls smtp_auth() but instead
tells me that "SMTP authentication not available". That means, that 
ESMTP.auth == 0. Doesn't that imply that there is no authenticator for SMTP
available at all? From how I read the code it hasn't even tried yet which
authenticators the server supports. I also found no place where ESMTP.auth or
stream->protocol.esmtp.auth got set.

Currently, my code boils down to this:

stream = smtp_open_full("hostname/user=username","esmtp",SMTPTCPPORT,OP_DEBUG);

(I tried both "esmtp" and "smtp" as protocol names, not sure which of the two
worked.)

And that fails and returns a NULL stream, with the message given above.

Is there any more help you could give me? Like, how to tell the smtp code that
there are authenticators (linkage.c does include auth_log and auth_md5) and that
it's supposed to use them.

--
 Karsten Ballüder  http://Ballueder.home.dhs.org/  mailto:[email-masked]
 Physics Department, Heriot-Watt University, Edinburgh, EH14 4AS, Scotland
                     Tel. +44-(0)-131-4513068  Fax. +44-(0)-131-4513136
            "In a world without fences, who needs Gates?"  

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Thu, 1 Jun 2000 10:25:12 -0700 (PDT)

On Thu, 1 Jun 2000 11:12:17 +0100 (GMT), Karsten Ballueder wrote:
> But what happens is that smtp_open_full() never calls smtp_auth() but
> instead tells me that "SMTP authentication not available".

That means that there are no authenticators common to both th eclient and the
server.

> I also found no place where ESMTP.auth or

It is set in smtp_helo().

> stream =
>  smtp_open_full("hostname/user=username","esmtp",SMTPTCPPORT,OP_DEBUG);

There is no such service name as "esmtp"; always use "smtp".

> And that fails and returns a NULL stream, with the message given above.

You need to find out what authenticators the SMTP server supports.  See what
it says in response to the EHLO command.  You should see one or more AUTH
entries in the response.

The CRAM-MD5 and LOGIN authenticators are always supported.  If you build with
Kerberos, then the GSSAPI authenticator is also supported.  If an SSL session
is in effect (imap-2000) then the PLAIN authenticator is also supported.