9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Authenticated SMTPD or factotum's p9cr
@ 2007-08-20 19:15 lucio
  2007-08-20 20:53 ` geoff
  0 siblings, 1 reply; 6+ messages in thread
From: lucio @ 2007-08-20 19:15 UTC (permalink / raw)
  To: 9fans

The objective is to configure an authenticating SMTP server, so if
somebody has a formula for that, I'm game.

As I failed to figure it all out for myself (but thanks to those who
contributed to the wiki page on how to do authenticated outgoing
SMTP), let me explain where I'm stumped.

The diagnostic is a very stubborn dhcpd server returning:

	535 5.7.1 Authentication failed: auth server protocol botch

I've added the '%r' error message in a modified version of smtpd.c, I
strongly recommend this change.

I traced the cause for the failure to the call to auth_userpasswd()
and subsequently to auth_challenge().  The former seems OK on the
surface, despite the following comment:

 * This process was derived empirically.
 * this was copied from inet's guard.

But the call:
	ch = auth_challenge("user=%q proto=p9cr role=server", user)
isn't very helpful: it always fails (in my situation) with an ugly:

RPC start (user=proxima proto=p9cr role=server) failed: auth server protocol botch

a message I have added to a copy of the library module
libauth/auth_challenge.c.

The documentation for auth_challenge() is very thin and the code is a
bit obscure too.  For my part, I can embarrassingly admit that I have
no idea where the "auth server" belongs in this discussion, never mind
what the real purpose of the "p9cr" protocol is.

However, in my test modules, changing "proto=p9cr" to "proto=p9sk1"
moves the probelm to the next action in auth_challenge(), that is,
instead of failing on auth_rpc(..."start"...), it now complains about
the lack of synchronisation on the following auth_rpc(..."read"...)
which seems logical enough.

So there are a few things that need explaining, at least to me: (1) Am
I right in believing that "tcp25" must run as a trusted process and
therefore occur in /rc/bin/service.auth if it is to employ TLS?  (2)
What factotum or auth server entry is required to make "user=proxima
proto=p9cr role=server" succeed as a factotum RPC?  (3) The Factotum
man page covers the various verbs used in the RPCs, but goes into no
detail whatsoever about the actual arguments to them.  Maybe a few
examples will make a big difference.

Oh, the auth_challenge() man page incorrectly mentions
auth_userpassword() which I presume is meant to be auth_userpasswd().

Anyway, back to authenticated incoming SMTP, how do I make it tick?
Who needs to be identified?  I presume each possible user must have an
entry somewhere on the auth server, but what kind of entry?

And is there not a problem I cannot identify in
libauth/auth_challenge() or the factotum module for "proto=p9cr"?

Thanks.

++L



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-21 18:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20 19:15 [9fans] Authenticated SMTPD or factotum's p9cr lucio
2007-08-20 20:53 ` geoff
2007-08-21  5:38   ` lucio
2007-08-21 18:10     ` erik quanstrom
2007-08-21 18:39       ` geoff
2007-08-21 18:48         ` lucio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).