Hello all,

I am having trouble configuring Cyrus in any way that will allow me to 
authenticate.  I've tried doing this several different ways according to the 
docs, the HOWTO, the O'Reilly IMAP book, and various list posts.  I keep 
getting incorrectly rejected when I try to login using imtest and the default 
authorization.  When I try to login using cyradm, I get a Perl error "Virtual 
memory exhausted...line 125".  This is totally confusing.  

Rather than explain all the details, I have created a clean installation as 
an example.  I'm sorry this is so long.  The kill-cyrus.py script at the 
beginning just deletes almost every file or directory on the disk containing 
either "cyrus" or "sasl".  This is as good as I can do for an uninstall.  
Eventually, we hope to allow connection via TLS and authentication against a 
remote LDAP server or via PAM.  For now, I'm trying to see that it can work 
in the simplest configuration.

My environment...
Linux, x86, Red Hat 7.1 with recent updates
Berkeley DB 3.1.17 (as installed with OS)
Cyrus IMAP 2.0.15
Cyrus SASL 1.5.24
Shadow passwords, no kerberos

A few specific questions...
Have I made some gross mistake here that would be causing these woes?
What is the meaning of the Perl error I'm seeing?
Why is it that I can log in using "login" but not with "authenticate"?
Does SASL take the place of PAM or does it act as an interface to PAM?
Would it help to try the RPM for Cyrus IMAP?  ... SASL?
What can I change to make this work?  ...the million dollar question :-)

If anyone can provide any insight, I would be very, very grateful.  I have 
been working at this for well over a week.  I am new to mail servers so it is 
very possible that I don't understand something basic.

Thank you.

Alex Quinn




###############################################################
###############################################################
[root@localhost /root]# ./kill-cyrus.py 
[root@localhost /root]# cd download/cyrus/cyrus-sasl-1.5.24
[root@localhost cyrus-sasl-1.5.24]# ./configure --with-pwcheck=/var/pwcheck 
--prefix=/usr --disable-gssapi --disable-krb4 --quiet
[...]
[root@localhost cyrus-sasl-1.5.24]# make all; make install
[...]
[root@localhost cyrus-sasl-1.5.24]# cd ../cyrus-imapd-2.0.15
[root@localhost cyrus-imapd-2.0.15]# ./configure --with-auth=unix 
--with-sasldir=/usr --with-openssl=/usr --with-com_err --disable-krb4 
--disable-gssapi --quiet
[...]
[root@localhost cyrus-imapd-2.0.15]# make all CFLAGS=-O; make install
[...]
[root@localhost cyrus-imapd-2.0.15]# cp master/conf/normal.conf 
/etc/cyrus.conf
[root@localhost cyrus-imapd-2.0.15]# useradd -g mail cyrus
[root@localhost cyrus-imapd-2.0.15]# passwd cyrus
Changing password for user cyrus
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully
[root@localhost cyrus-imapd-2.0.15]# su cyrus
[cyrus@localhost cyrus-imapd-2.0.15]$ tools/mkimap
reading configure file...
i will configure directory /var/imap.
i saw partition /var/spool/imap.
done
creating /var/imap...
creating /usr/sieve...
creating /var/spool/imap...
done
[cyrus@localhost cyrus-imapd-2.0.15]$ exit                
exit
[root@localhost cyrus-imapd-2.0.15]# cat /etc/imapd.conf 
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: root cyrus
sasl_pwcheck_method: pwcheck
servername: alex.olympus.net
# allowanonymouslogin: yes
allowplaintext: yes
[root@localhost cyrus-imapd-2.0.15]# chown cyrus /etc/imapd.conf 
[root@localhost cyrus-imapd-2.0.15]# ll /etc/imapd.conf 
-rw-r--r--    1 cyrus    root          186 Aug 24 01:44 /etc/imapd.conf
[root@localhost imap]# pwcheck
[root@localhost imap]# /usr/cyrus/bin/master &
[1] 16106
[root@localhost cyrus-imapd-2.0.15]# su cyrus
[cyrus@localhost cyrus-imapd-2.0.15]$ imtest localhost
C: C01 CAPABILITY
S: * OK alex.olympus.net Cyrus IMAP4 v2.0.15 server ready
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID 
NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES IDLE
S: C01 OK Completed
Password: 
C: L01 LOGIN cyrus {8}
+ go ahead
C: <omitted>
L01 OK User logged in
Authenticated.
Security strength factor: 0
. logout
* BYE LOGOUT received
. OK Completed
Connection closed.
[cyrus@localhost cyrus-imapd-2.0.15]$ ll /etc/sasldb  
ls: /etc/sasldb: No such file or directory
[cyrus@localhost cyrus-imapd-2.0.15]$ cyradm localhost
Please enter your password: 
IMAP Password: localhost.localdomain> 
localhost.localdomain> exit
[cyrus@localhost cyrus-imapd-2.0.15]$ ll /etc/sasldb
ls: /etc/sasldb: No such file or directory
[cyrus@localhost cyrus-imapd-2.0.15]$ /usr/sbin/saslpasswd -c cyrus
Password: 
Again (for verification): 
saslpasswd: generic failure
[cyrus@localhost cyrus-imapd-2.0.15]$ ll /etc/sasldb
ls: /etc/sasldb: No such file or directory
[cyrus@localhost cyrus-imapd-2.0.15]$ exit
exit
[root@localhost cyrus-imapd-2.0.15]# /usr/sbin/saslpasswd -c cyrus
Password: 
Again (for verification): 
saslpasswd: generic failure
[root@localhost cyrus-imapd-2.0.15]# ll /etc/sasldb
-rw-r-----    1 root     root        12288 Aug 24 02:05 /etc/sasldb
[root@localhost cyrus-imapd-2.0.15]# date
Fri Aug 24 02:05:43 PDT 2001
[root@localhost cyrus-imapd-2.0.15]# /usr/sbin/saslpasswd -c cyrus 
Password: 
Again (for verification): 
[root@localhost cyrus-imapd-2.0.15]# su cyrus
[cyrus@localhost cyrus-imapd-2.0.15]$ imtest localhost
C: C01 CAPABILITY
S: * OK alex.olympus.net Cyrus IMAP4 v2.0.15 server ready
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID 
NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5
S: C01 OK Completed
C: A01 AUTHENTICATE DIGEST-MD5
S: + 
cmVhbmNlPSJEYW5EU5PYTJVd3N0VGd6UHZRbrSDZJPSIscW9wPSJhdXRoLGF1dGgtaW50LGF1dGgtY29uTQrUEZlYUUzMzhmZUlLb3VucU8scmM0LTU2LHJjNCG09ImFsZXgub2x5bXB1cy5uZlcyIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3MZiIsY2lwaGVyPSJyYzQtNDA=
Please enter your password: 
C: 
dXNlcmIHVzLm5ldCIsbm9uY2U9IkRhbkQxTk9hMlV3c3RYz0wMDAwMDAwMSxxb3A9YXV0UZ3pQdlFtNCtQRmVhRTMzixjW5KSmQvOEZ6bm9uY2U9IkhneTnVHRTJHMkx0TGRZTmsydlVDQ3dLN1tc45ZjI2UUU9IixuaC1jb25mLGNpcGhlcj0icmM0IixjaGFyc2V0PXV0Zi04LGRpZ2VzdC11cmk9ImltYXAvbG9jYWxob3N0LmxvY2FsZG9tYWluIixyZXNwb25zZT0zZTIwNjEwNzc5OWRlNjk0OWY2MzNlODc5YjlkYmU4ZQ==
S: A01 NO authentication failure
Authentication failed. generic failure
Security strength factor: 128
. logout
* BYE LOGOUT received
. OK Completed
Connection closed.
[cyrus@localhost cyrus-imapd-2.0.15]$ imtest -m login localhost                        
                                                                           
  
C: C01 CAPABILITY
S: * OK alex.olympus.net Cyrus IMAP4 v2.0.15 server ready
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID 
NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5
S: C01 OK Completed
Password: 
C: L01 LOGIN cyrus {9}
+ go ahead
C: <omitted>
L01 NO Login failed: Incorrect password
Authentication failed. generic failure
Security strength factor: 0
. logout   
* BYE LOGOUT received
. OK Completed
Connection closed.
[cyrus@localhost cyrus-imapd-2.0.15]$ imtest -m login localhost
C: C01 CAPABILITY
S: * OK alex.olympus.net Cyrus IMAP4 v2.0.15 server ready
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID 
NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT 
THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5
S: C01 OK Completed
Password: 
C: L01 LOGIN cyrus {8}
+ go ahead
C: <omitted>
L01 OK User logged in
Authenticated.
Security strength factor: 0
. logout
* BYE LOGOUT received
. OK Completed
Connection closed.
[cyrus@localhost cyrus-imapd-2.0.15]$ cyradm localhost
Please enter your password: 
IMAP Password: Virtual memory exhausted at 
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Cyrus/IMAP.pm line 125.

[root@localhost cyrus-imapd-2.0.15]# tail /var/log/messages
Aug 24 02:06:24 localhost saslpasswd: PLAIN: set secret for cyrus
Aug 24 02:06:24 localhost saslpasswd: DIGEST-MD5: set secret for cyrus
Aug 24 02:06:24 localhost saslpasswd: CRAM-MD5: set secret for cyrus
Aug 24 02:06:32 localhost su(pam_unix)[15925]: session opened for user cyrus 
by (uid=0)
Aug 24 02:06:47 localhost imapd[15945]: badlogin: 
localhost.localdomain[127.0.0.1] DIGEST-MD5 authentication failure
Aug 24 02:07:16 localhost imapd[15945]: badlogin: 
localhost.localdomain[127.0.0.1] plaintext cyrus Incorrect password
Aug 24 02:07:35 localhost imapd[15945]: login: 
localhost.localdomain[127.0.0.1] cyrus plaintext 
Aug 24 02:07:54 localhost imapd[15945]: badlogin: 
localhost.localdomain[127.0.0.1] DIGEST-MD5 authentication failure
Aug 24 02:10:52 localhost su(pam_unix)[15925]: session closed for user cyrus
[root@localhost cyrus-imapd-2.0.15]# tail /var/log/imapd.log 
Aug 24 02:07:08 localhost imapd[15945]: accepted connection
Aug 24 02:07:16 localhost imapd[15945]: badlogin: 
localhost.localdomain[127.0.0.1] plaintext cyrus Incorrect password
Aug 24 02:07:30 localhost imapd[15945]: accepted connection
Aug 24 02:07:35 localhost imapd[15945]: login: 
localhost.localdomain[127.0.0.1] cyrus plaintext 
Aug 24 02:07:49 localhost imapd[15945]: accepted connection
Aug 24 02:07:54 localhost imapd[15945]: badlogin: 
localhost.localdomain[127.0.0.1] DIGEST-MD5 authentication failure
Aug 24 02:08:01 localhost master[12330]: process 15945 exited, status 0
###############################################################
###############################################################

Reply via email to