--============_-1136006745==_============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Reposting this. Sorry, my MUA didn't notice the Reply-To for some reason.
Post by Wietse VenemaWould it help if after Postfix 2.1 there is a SASL plug-in protocol
interface? This would eliminate the need for patching Postfix.
Do you mean you are going to drop smtpd?_sasl_.* files altogether?
SASL would be an independent daemon that just checks the credentials!
That would definitely be a change from the current implementation.
That approach would have advantages: clear cut functional and
privilege separation. The SASL daemon could run outside a chroot jail
and have access to system passwords. Good!
There would be some difficulties:
- How would the server know what mechanisms to advertise in response to EHLO?
- Who would take care of base64 en/decoding?
- The protocol would end up being quite complicated. You would need
to pass back and forth binary protocol data to/from the client, and
out-of-band state and errors between Postfix and the SASL daemon.
Actually you would end up duplicating the Cyrus SASL API with a
remote procedure call equivalent. The Cyrus API for the server side
goes like:
1) initialize
2) get a list of mechanisms
3) start the mechanism that client selected
4) pass protocol data to/from client until success or error
5) clean up
With the different mechanisms there are variable number of rounds at #4.
I can't see any other viable protocol to achieve SMTP authentication.
Perhaps I am standing too close after studying Cyrus API for months
:o(
BTW: Would the SASL plug-in protocol interface handle the client side
(smtp$) as well?
Post by Wietse VenemaOf course any reasonable protocol will do (I like the protocol as
described in in the SMTPD_POLICY_README file but am not married to
it). Anything that makes it easier to plug in SASL without poisoning
the rest of the code :-)
<grumble>I took all the trouble to make my RSASL call compatible with
Cyrus SASL to ease interfacing with current Postfix. I am not
particularly fond of the Cyrus SASL API. It was no fun to write code
around it.</grumble>
My main design choices for RSASL were:
- run inside unprivileged smtpd, that is: there is no way to access
system passwords
- use Postfix maps to store the secrets, just to make the
configuration really simple
Building a separate SASL daemon would invalidate both :o(
I don't know how you feel about the smtpd?_sasl_.* code. If they are
going to stay around, my code would eventually need just a small
patch to smtpd_sasl_glue.c to provide one more callback to look up
the secret from a Postfix map. Oh, and the supporting patches to
mail_params.h and smtpd.c to define the map parameter. These patches
could be merged to base Postfix distribution, since they do not
interfere with Cyrus SASL or non-SASL operation.
The huge patch that changes just about everything was for the early
release only. It includes my whole SASL library, which is should be
turned into an independently compiled library. Then it would be just
linked in. The patch grew even more when I made up a new compile flag
(HAS_LIBCRYPTO) to keep my code out of lmtp and lmtpd. Then I had to
change most #ifdefs. The HAS_LIBCRYPTO will not be needed when done.
I attach a draft of the final modifications to Postfix sources. It is
a much less obtrusive patch :o) I hand edited it from the big patch,
so it may not actually apply. It is just to show what RSASL would
eventually require.
--
Cheers
Petri
GSM: +358 400 505 939
--============_-1136006745==_============
Content-Id: <a0602040bbc49e8e682ef@[192.168.0.2].0.0>
Content-Type: multipart/appledouble; boundary="============_-1136006745==_D============"
--============_-1136006745==_D============
Content-Transfer-Encoding: base64
Content-Type: application/applefile; name="%"
Content-Disposition: attachment; filename="%"
; modification-date="Sat, 7 Feb 2004 02:11:12 +0200"
AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAPgAAABUAAAAJAAAAUwAAACAA
AAAIAAAAcwAAABBtaW5pLXJzYXNscGYuZGlmZi56aXAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAe3BcAHtwXAS20MAAe3Ecc=
--============_-1136006745==_D============
Content-Type: application/octet-stream; name="mini-rsaslpf.diff.zip"
Content-Disposition: attachment; filename="mini-rsaslpf.diff.zip"
Content-Transfer-Encoding: base64
UEsDBBQACAAIABMRRzAAAAAAAAAAAAAAAAARABAAbWluaS1yc2FzbHBmLmRpZmZVWAwA
hiwkQIYsJED1ARQAjVdtb9pIEP5MfsWIU1sgNmDzEiDqSYSQKg0BBPRa6XTybeyFuDG2
5bXT0Cj//WZ3bbCN6RVZxt6deXZ2Xp5ZW/Z6DaoJagDqA6hXoE6BBWbddChxGxvHeyBO
Y0tsx/BJQLas/sinCyfOarXa/+iWliSEa2qCfgFab9BsD/Q26M1m60xV1ZPApZvAhs/E
BdBB1wd4tbtcq81XTP+EBf1mX+lrbRADHFYO9ACf1TOAPyy6tl0K1+MbY3m/ml8by+Fy
Yoynw6vJuNRECfoS0s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yc2FzbHBmLmRpZmZVWAgAhiwkQIYs
JEBQSwECFQMKAAAAAABmEUcwAAAAAAAAAAAAAAAACQAMAAAAAAAAAABA/UFiBgAAX19N
QUNPU1gvVVgIACAtJEAgLSRAUEsBAhUDFAAIAAgAExFHMDFrDc0jAAAAUgAAABwADAAA
AAAAAAAAQKSBmQYAAF9fTUFDT1NYLy5fbWluaS1yc2FzbHBmLmRpZmZVWAgAhiwkQIYs
JEBQSwUGAAAAAAMAAwDkAAAAFgcAAAAA
--============_-1136006745==_D============--
--============_-1136006745==_============--