From: Dustin Puryear (no email)
Date: Wed May 01 2002 - 00:57:36 EDT
Any help on this? Anyone here use Cyrus with mysql? Am I the only one? This
seems like it would be a pretty common thing.
At 01:34 AM 4/29/2002 -0500, you wrote:
>Okay, I am diligently working to get Cyrus to play nice with mysql, but
>something ain't working. I have two cases that I am testing, both of which
>fail. In the first case I am trying to authenticated against Cyrus with an
>account that exist in the mysql database. In the second case, I am trying
>to authenticate against Cyrus with the account in the sasl database.
>
>I installed Cyrus via ports on a test FreeBSD box:
>
>cyrus-imapd-2.0.16_2 The cyrus mail server, supporting POP3 and IMAP4
>protocols
>cyrus-sasl-1.5.27_2 RFC 2222 SASL (Simple Authentication and Security Layer)
>
>As well as mysql:
>
>mysql-client-3.23.42 Multithreaded SQL database (client)
>mysql-server-3.23.49 Multithreaded SQL database (server)
>
>Next, I have a database named mail in my mysql database:
>
>freebsd# mysql -u mail -psecret -h localhost \
>? -e 'select username, password from accountuser' mail
>+----------+----------+
>| username | password |
>+----------+----------+
>| 0001 | password |
>+----------+----------+
>
>I have Cyrus setup to use this database with the exact information I just
>successfully used on the command-line; the important section of imapd.conf:
>
>sasl_pwcheck_method: mysql
>sasl_mysqluser: mail
>sasl_mysqlpasswd: secret
>sasl_mysqlhost: localhost
>sasl_mysqldatabase: mail
>sasl_mysqltable: accountuser
>sasl_mysqluidcol: username
>sasl_mysqlpwcol: password
>
>I did compiled Cyrus with mysql support.
>
>So, let's try to login as user 0001:
>
>freebsd# cat .fetchmailrc
>poll localhost protocol pop3 username "0001" password "password"
>
>freebsd# fetchmail -vc
>fetchmail: 5.9.6 querying localhost (protocol POP3) at Sun Apr 28 22:35:37
>2002: poll started
>fetchmail: POP3< +OK <> Cyrus
>POP3 v2.0.16 server ready
>fetchmail: POP3> CAPA
>fetchmail: POP3< +OK List of capabilities follows
>fetchmail: POP3< SASL DIGEST-MD5 CRAM-MD5
>fetchmail: POP3< EXPIRE NEVER
>fetchmail: POP3< LOGIN-DELAY 0
>fetchmail: POP3< TOP
>fetchmail: POP3< UIDL
>fetchmail: POP3< PIPELINING
>fetchmail: POP3< RESP-CODES
>fetchmail: POP3< USER
>fetchmail: POP3< IMPLEMENTATION Cyrus POP3 server v2.0.16
>fetchmail: POP3< .
>fetchmail: POP3> AUTH CRAM-MD5
>fetchmail: POP3< +
>PDM5Nzk3OTgwODEuMTM0MTg0MzdAZnJlZWJzZC5kcGJveC5kaHMub3JnPg==
>fetchmail: POP3> MDAwMSAyOWFjZmUzNTE3YTUzMjBlYWVlYTAzMjcyZWUwNTQyYQ==
>fetchmail: POP3< -ERR authenticating: no secret in database
>fetchmail: authenticating: no secret in database
>fetchmail: POP3> USER 0001
>fetchmail: POP3< -ERR Invalid user
>fetchmail: Invalid user
>fetchmail: POP3> PASS *
>fetchmail: POP3< -ERR Must give USER command
>fetchmail: Must give USER command
>fetchmail: Authorization failure on 0001 at localhost
>fetchmail: POP3> QUIT
>fetchmail: POP3< +OK
>fetchmail: 5.9.6 querying localhost (protocol POP3) at Sun Apr 28 22:35:40
>2002: poll completed
>fetchmail: normal termination, status 3
>
>No secret in database? Via syslog I see that Cyrus reports:
>
>Apr 28 22:35:03 freebsd pop3d[51785]: badlogin: localhost[::1] CRAM-MD5 no
>secret in database
>Apr 28 22:35:03 freebsd pop3d[51785]: badlogin: localhost[::1] plaintext
>0001 invalid user
>
>So, let's try against another type of user:
>
>freebsd# sasldblistusers
>user: cyrus realm: freebsd.dpbox.dhs.org mech: PLAIN-APOP
>user: cyrus realm: freebsd.dpbox.dhs.org mech: DIGEST-MD5
>user: cyrus realm: freebsd.dpbox.dhs.org mech: PLAIN
>user: cyrus realm: freebsd.dpbox.dhs.org mech: CRAM-MD5
>
>freebsd# cyradm -u cyrus localhost
>Please enter your password: secret
>Apr 28 22:37:40 freebsd imapd[51817]: login: localhost[::1] cyrus
>DIGEST-MD5 User logged in
>localhost> ^d
>
>freebsd# cat .fetchmailrc
>#poll localhost protocol pop3 username "0001" password "password"
>poll localhost protocol pop3 username "cyrus" password "secret"
>
>freebsd# fetchmail -vc
>fetchmail: 5.9.6 querying localhost (protocol POP3) at Sun Apr 28 22:38:19
>2002: poll started
>fetchmail: POP3< +OK <> Cyrus
>POP3 v2.0.16 server ready
>fetchmail: POP3> CAPA
>fetchmail: POP3< +OK List of capabilities follows
>fetchmail: POP3< SASL DIGEST-MD5 CRAM-MD5
>fetchmail: POP3< EXPIRE NEVER
>fetchmail: POP3< LOGIN-DELAY 0
>fetchmail: POP3< TOP
>fetchmail: POP3< UIDL
>fetchmail: POP3< PIPELINING
>fetchmail: POP3< RESP-CODES
>fetchmail: POP3< USER
>fetchmail: POP3< IMPLEMENTATION Cyrus POP3 server v2.0.16
>fetchmail: POP3< .
>fetchmail: POP3> AUTH CRAM-MD5
>fetchmail: POP3< + PDk3MjA5NDcuMTM0MTg1OTlAZnJlZWJzZC5kcGJveC5kaHMub3JnPg==
>fetchmail: POP3> Y3lydXMgYzcyNGRiOWZhOWM5MDMyYWIxMzk0MjFkM2RmN2YxMTQ=
>fetchmail: POP3< -ERR Invalid login
>fetchmail: Invalid login
>fetchmail: POP3> USER cyrus
>fetchmail: POP3< +OK Name is a valid mailbox
>fetchmail: POP3> PASS *
>fetchmail: POP3< -ERR Invalid login
>fetchmail: Invalid login
>fetchmail: Authorization failure on cyrus at localhost
>fetchmail: POP3> QUIT
>fetchmail: POP3< +OK
>fetchmail: 5.9.6 querying localhost (protocol POP3) at Sun Apr 28 22:38:25
>2002: poll completed
>fetchmail: normal termination, status 3
>
>In this case Cyrus is reporting:
>
>Apr 28 22:38:22 freebsd pop3d[51821]: badlogin: localhost[::1] plaintext
>cyrus cannot select MySQL database
>
>Does anyone know what the heck is going on here?
>
>Regards, Dustin
>
>---
>Dustin Puryear <>
>UNIX and Network Consultant
>http://members.telocity.com/~dpuryear
>PGP Key available at http://www.us.pgp.net
>In the beginning the Universe was created.
>This has been widely regarded as a bad move. - Douglas Adams
--- Dustin Puryear <> UNIX and Network Consultant http://members.telocity.com/~dpuryear PGP Key available at http://www.us.pgp.net In the beginning the Universe was created. This has been widely regarded as a bad move. - Douglas Adams
|
|
|