OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: help me please

From: Aaron P. Martinez (mlproficuous.com)
Date: Sun Apr 11 2004 - 10:58:48 CDT


On Sun, 2004-04-11 at 01:51, Andreas Winkelmann wrote:
> Am Sonntag, 11. April 2004 02:25 schrieb Aaron P. Martinez:
>
> > ------snip----
> >
> > > > FreeBsd 4.8
> > > > All from lasts ports:
> > > > Cyrus-SASL
> > > > PORTVERSION= 2.1.18
> > >
> > > Hmm, if you use Cyrus-SASL 2.1.18 your smtpd.conf is wrong.
> >
> > it was, but so is this on.. the following corrections will get you
> > going.
> >
> > > It must be something like this:
> > >
> > > pwcheck_method: auxprop
> >
> > correct
> >
> > > mech_list: plain login cram-md5 digest-md5
> >
> > correct if you want all these methods...i suspect you only need plain
> > here
>
> It does not matter, if he had less mechanisms installed.And if he has more
> installed, he should use this.
>
> > > auxprop_plugin: sql
> >
> > correct
> >
> > > sql_engine: mysql
> >
> > correct
> >
> > > sql_hostnames: localhost
> >
> > correct or you can have 127.0.0.1
>
> "localhost" means that the mysql-libs trys to use a unix-socket.
> "127.0.0.1" uses inet-sockets.
>
> > > sql_user: sasluser
> >
> > correct
> >
> > > sql_passwd: secret
> >
> > correct
> >
> > > sql_database: sasldb
> >
> > wrong... you'll want to have this read
> > sql_database: postfix
>
> It was only an example.
>
> > > sql_select: select `%p` from users where userName = '%u'
> >
> > wrong.... you should have for your setup:
> > sql_statement: select password from mailbox where username='%u%r'
>
> "sql_statement" is only for backwards compatibility. The prefered option since
> 2.1.17 is "sql_select". "sql_statement" works until 2.1.18, but i don't know
> for example if it will work with 2.1.19....
yes...apologies, this one slipped bye me i was doing too many things at
once and i have a few machines still using earlier versions.

I understand that these were examples. but he didn't when he used the
%p, he was getting the unknown column "userPassword"

sql_select: select '%p' from users where username = '%u%r'

>
> > %p is a default value and cyrus_sasl uses UserPassword for it. the other
> > errors i believe you're getting because you put in the insert and update
> > statements. TAKE them out unless you absolutely need them.
>
> insert and update are used, if you try to add or change an entry with
> Cyrus-SASL. For example with "saslpasswd".
>
> > You don't need the insert or the update statements to simply do password
> > authentication.
>
> This is correct.
>
> > > sql_insert: insert into users (userName,userRealm,`%p`) values
> > > ('%u','%r','%v') sql_update: update users set `%p` = '%v' where userName
> > > = '%u'
> > >
> > > And make sure you made the Link /usr/lib/sasl2 => /usr/local/lib/sasl2
> >
> > I still urge you to adjust your main.cf, you don't need that long file
> > when most of the thigs you have listed there are the defaults, it would
> > also make it must easier for us to read.
>
> It was an example of a running smtpd.conf. That he had to change something to
> fit it to his system was clear.
Bopros, you have the definitive guide to what you need to know for sql_
syntax in sasl 2.1.18 right in your src. tarball. the default path
after you untar it is /cyrus-sasl-2.1.18/doc/options.html, it will tell
you everything you need to know about the options.

Aaron