Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jun 2003 20:31:51 -0500
From:      "Scot W. Hetzel" <hetzels@westbend.net>
To:        "Mauro Boschi" <mauro.gufi@libero.it>, <freebsd-ports@freebsd.org>
Subject:   Re: postfix+sasl2+db41+ldap21 ports install problem?
Message-ID:  <012101c33f70$91f38ad0$11fd2fd8@westbend.net>
References:  <001d01c3389f$65293220$5900a8c0@lahaine.local>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "Mauro Boschi" <mauro.gufi@libero.it>
> I'm trying to install postfix+sasl2+db41+ldap21 via postfix port on a
> 4.8-STABLE. Everything seems going well but I've notice a stange warning
> during the sasl port install in the /var/log/messages:
>
> Jun 22 00:28:23 bsd48 saslpasswd2: Could not open db
> Jun 22 00:28:23 bsd48 saslpasswd2: Couldn't update db
> Jun 22 00:28:24 bsd48 last message repeated 5 times
>
> this happend when the sasl port was running ldconfig:
>
> ===>   Compressing manual pages for cyrus-sasl-2.1.13_4
> ===>   Running ldconfig
> /sbin/ldconfig -m /usr/local/lib
> ===>   Registering installation for cyrus-sasl-2.1.13_4
>
The error wasn't caused by ldconfig, it was caused during the running of
pkg-install. When the ${PREFIX}/etc/sasldb* file doesn't exist, the
pkg-install script attempts to create an empty sasldb* file with these
commands:

    echo "test" | ${PREFIX}/bin/saslpasswd2 -p -c cyrus
    ${PREFIX}/bin/saslpasswd2 -d cyrus
    chown cyrus:mail ${PREFIX}/etc/sasldb2
    chmod 640 ${PREFIX}/etc/sasldb2

The first command adds user "cyrus" with password "test" to the sasldb file,
this is what causes the error to occur due to there was no sasldb* file for
saslpasswd2 to open (these errors can be ignored).  Next it deletes the
"cyrus" user from the sasldb2 file, leaving us with a empty sasldb2 file.
Finaly, we set the correct owner, group and permisions on the sasldb2 file.

> the problem now is that I'm unable to correctly use the sasl layer.
> There is something that I can do to install "in the right way" postifix
with
> sasl2?
> What I'm doing wrong? I've test this on various system 4.8-RELEASE,
> 4.8-STABLE and 5.1-RELEASE...
> I really need SMTP AUTH! : )

Starting with revison *_3 or *_4 of the security/cyrus-sasl2 port, it was
broken in two due to a circular dependancy was being caused by the OpenLDAP
port depending on the security/cyrus-sasl2 port and the saslauthd daemon was
being compiled to use ldap for user authentication in the
security/cyrus-sasl2 port. You now need to install the
security/cyrus-sasl2-saslauthd, if you want to use either pam or ldap for
authentication of your users.

You also need to set the pwcheck_method (sasldb or saslauthd) appropriately
for your postfix installation (${PREFIX}/lib/sasl2/Postfix.conf  (check your
postfix docs for the correct name of this file)).

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?012101c33f70$91f38ad0$11fd2fd8>