Cyradm - bug or incorrect settings ?
Alain Spineux
aspineux at gmail.com
Wed Feb 13 04:14:59 EST 2008
On Feb 13, 2008 7:10 AM, Oleg Kostyuk <cub.uanic at gmail.com> wrote:
> 2008/2/13, Alain Spineux <aspineux at gmail.com>:
>
> > On Feb 12, 2008 10:32 PM, Oleg Kostyuk <cub.uanic at gmail.com> wrote:
> > > Hello all!
> > > I have problem with connecting to cyrus via cyradm.
> > > This my configuration:
> > >
> > > === from imapd.conf ===
> > > virtdomains: userid
> > > defaultdomain: cub.org.ua
> > > loginrealms: cub.org.ua home.cub.org.ua
> > > sasl_pwcheck_method: auxprop
> > > sasl_auxprop_plugin: sql
> > > sasl_mech_list: PLAIN
> > > sasl_sql_engine: sqlite
> > > sasl_sql_database: /etc/sasldb2.sqlite
> > > sasl_sql_select: select password from sasl_users where username = '%u'
> > > and domain='%r'
> > > === end imapd.conf ===
> > >
> > >
> > > === from sasldb2.sqlite ===
> > > # echo "select username, domain, password from sasl_users;" | sqlite
> > > /etc/sasldb2.sqlite
> > > cyrus||MailAdmin
> > > cyrus|cub.org.ua|MailAdmin
> > > #
> > > === end sasldb2.sqlite ===
> > >
> > >
> > > === from host command line ===
> > > # hostname
> > > hosting
> > > # hostname -f
> > > hosting.cub.org.ua
> > > # ls -la /etc/sasldb2.sqlite
> > > -rw-rw---- 1 cyrus sasl 4096 2008-02-12 18:25 /etc/sasldb2.sqlite
> > > #
> > > === end of host command line ===
> > >
> > > === try to connect ===
> > > # cyradm --user cyrus at cub.org.ua localhost
> > > IMAP Password:
> > > at /usr/lib/perl5/Cyrus/IMAP/Admin.pm line 119
> > > cyradm: cannot authenticate to server as cyrus at cub.org.ua
> > > #
> > > === end of try ===
> > >
> > > === errors in log ===
> > > ==> /var/log/auth.log <==
> > > Feb 12 18:27:10 hosting cyrus/imap[9940]: sql auxprop plugin using sqlite engine
> > > Feb 12 18:27:10 hosting perl: No worthy mechs found
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: begin transaction
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin: unable to open
> > > database file
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: Unable to begin transaction
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin create statement
> > > from userPassword cyrus hosting
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin doing query
> > > select password from sasl_users where username = 'cyrus' and
> > > domain='hosting';
> > >
> > > ==> /var/log/syslog <==
> > > Feb 12 18:27:16 hosting cyrus/master[9803]: process 9940 exited,
> > > signaled to death by 11
> > > Feb 12 18:27:16 hosting cyrus/master[9803]: service imap pid 9940 in
> > > BUSY state: terminated abnormally
> > > === end of errors ===
> > >
> > > And finally, my questions:
> > > 1) why cyradm tries "hosting" realm, instead of "cub.org.ua" ? This is
> > > bug or my mistake ?
> >
> > can you make a
> > # grep localhost /etc/hosts
> > Do you have "hosting" on this line too ?
>
> # grep -E localhost\|hosting /etc/hosts
> 127.0.0.1 localhost
> 127.0.1.1 hosting.cub.org.ua hosting
> #
This is unusual but it should work. I would have used :
127.0.0.1 hosting.cub.org.ua hosting localhost
or
127.0.0.1 localhost
1.2.3.4 hosting.cub.org.ua hosting
with 1.2.3.4 one of the ip address of the server, one that would never change.
Then I dont know why it is using hosting as your realm
>
> This is my first debian install, and it's something strange to me (127.0.1.1 :)
> Is this should be corrected?
>
> > > 2) from where coming "sql plugin: unable to open database file" error ?
> >
> > Can you try a
> > # chmod 666 /etc/sasldb2.sqlite
> > just for testing ?
>
> Already tried, but unfortunately this not help - all work exactly same
> way with 0666 and 0660
Do you still have the error about "sql plugin: unable to open database file".
I have no more idea and coonot help you more.
>
>
>
> > > Btw, if I create entry in database with domain == "hosting" - all
> > > things work correctly (except ignoring "cub.org.ua" realm).
> > > I'm using Debian Etch, and all software installed from stable branch
> > > (cyrus is 2.2.13-10 and sasl2 is 2.1.22.dfsg1-8).
>
> --
> Sincerely yours,
> Oleg Kostyuk (CUB-UANIC)
>
--
Alain Spineux
aspineux gmail com
May the sources be with you
More information about the Info-cyrus
mailing list