← Back to team overview

sslug-teknik team mailing list archive

Re: cyrus sasl/imap/mysql

 

Aha, jeg kom et skridt videre. Nu crasher imapd ikke mere, og jeg kan
connecte til imapd.

Foerst med telnet

# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK server Cyrus IMAP4 v2.2.6 server ready
. logout
* BYE LOGOUT received
. OK Completed
Connection closed by foreign host.

cyrus.log

Jul  3 14:57:56 server imap[27223]: accepted connection
Jul  3 14:59:02 server master[27070]: process 27223 exited, status 0

Siden med imtest

# imtest -m login -a mogens
WARNING: no hostname supplied, assuming localhost

S: * OK server Cyrus IMAP4 v2.2.6 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN
MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE
S: C01 OK Completed
Please enter your password:
C: L01 LOGIN mogens {7}
S: + go ahead
C: <omitted>
S: L01 NO Login failed: user not found
Authentication failed. generic failure
Security strength factor: 0
C: Q01 LOGOUT
Connection closed.

Cyrus debug cyrus.log

Jul  3 15:00:27 server master[27278]: about to exec /usr/local/cyrus/bin/imapd
Jul  3 15:00:27 server imap[27278]: executed
Jul  3 15:00:27 server imap[27278]: accepted connection
Jul  3 15:00:31 server imap[27278]: badlogin:
    localhost [127.0.0.1] plaintext mogens SASL(-13): user not found: checkpass failed
Jul  3 15:01:38 server master[27070]: process 27278 exited, status 0

og i auth loggen

Jul  3 15:00:27 server imap[27278]: sql auxprop plugin using mysql engine
Jul  3 15:00:31 server imap[27278]: sql plugin Parse the username mogens
Jul  3 15:00:31 server imap[27278]: sql plugin try and connect to a host
Jul  3 15:00:31 server imap[27278]: sql plugin trying to open db '' on host ''
Jul  3 15:00:31 server imap[27278]: sql plugin could not connect to host
Jul  3 15:00:31 server imap[27278]: sql plugin couldn't connect to any host

Det ser ud til at /etc/imapd.conf ikke bliver laest rigtigt. Den fanger auxprop/mysql
men ikke host, db, user, password

Jeg kan ikke se andet end at imapd.conf er lige efter bogen, eller hvad?

configdirectory:        /var/imap/config
partition-default:      /var/imap/mail
lmtpsocket:             /var/imap/socket/lmtp
sievedir:               /var/imap/sieve
sieveusehomedir:        false
duplicate_db:           skiplist
hashimapspool:          true
sendmail:               /usr/sbin/sendmail
admins:                 cyrus
postmaster:             mogens@xxxxxxxxxxxxx
sasl_pwcheck_method:    auxprop
sasl_auxprop_plugin:    sql
sasl_sql_engine:        mysql
sasl_mech_list:         PLAIN
sasl_mysql_hostname:    localhost
sasl_mysql_user:        cyrus
sasl_mysql_passwd:      xxxxxxxx
sasl_mysql_database:    cyrus
sasl_mysql_verbose:     true
sasl_sql_select:        select passwd from users where login='%u'
sasl_sql_insert:        insert into users(realm, login, passwd) values('%r', '%u', '%v')
sasl_sql_update:        update users set passwd='%v' where login='%u'


Later
Mogens




Follow ups

References