Invalid mailbox name?

trichard trichard at hypermall.net
Wed Feb 18 10:32:48 EST 2004


Hi Mike,

Answers inline:

Mike O'Rourke wrote:
> Hi again, trichard,
> 
> <Preliminary note:> first try below with things as-is. Then try adding
> the following line to /etc/imapd.conf:
> loginrealms: post.mydomain.com mydomain.com
> 
> restarting the cyrus master process after changing /etc/imapd.conf.
> </Preliminary Note:>
> 
> First, try:
> imtest -u test at mydomain.com -a test at mydomain.com -t '' localhost

This results in an "Authentication Failure" with no prompt for a 
password.  If I put -m plain in front of localhost it does prompt me for
password, but still fails:

[root at post etc]# imtest -u test at domain.com -a test at domain.com -t '' -m 
plain localhost
S: * OK post.domain.com Cyrus IMAP4 v2.2.3 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 
STARTTLS AUTH=GSSAPI AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
C: S01 STARTTLS
S: S01 OK Begin TLS negotiation now
verify error:num=18:self signed certificate
TLS connection established: TLSv1 with cipher DES-CBC3-SHA (168/168 bits)
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 
AUTH=GSSAPI AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
Please enter your password:
C: A01 AUTHENTICATE PLAIN 
dGVzdEBzYXBlcmVvbi5jb20AdGVzdEBzYXBlcmVvbi5jb20AdGVzdDEyMw==
S: A01 NO authentication failure
Authentication failed. generic failure
Security strength factor: 168

> and try the imap command
> A01 select inbox

Didn't get authenticated so was never prompted for this unfortunately.

> If I understand your setup correctly, this should fail.

Yep it sure did!  :-)

> Then try
> imtest -u test at mydomain.com -a test -t '' localhost

Same as above with this one.  Without the "-m plain" in front of 
localhost it fails outright.  If I use "-m plain" before localhost I get 
prompted for my password, but it still fails:

[root at post etc]# imtest -u test at domain.com -a test -t '' -m plain localhost
S: * OK post.domain.com Cyrus IMAP4 v2.2.3 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 
STARTTLS AUTH=GSSAPI AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
C: S01 STARTTLS
S: S01 OK Begin TLS negotiation now
verify error:num=18:self signed certificate
TLS connection established: TLSv1 with cipher DES-CBC3-SHA (168/168 bits)
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 
AUTH=GSSAPI AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
Please enter your password:
C: A01 AUTHENTICATE PLAIN dGVzdEBzYXBlcmVvbi5jb20AdGVzdAB0ZXN0MTIz
S: A01 NO user not found
Authentication failed. generic failure
Security strength factor: 168

> and then try the imap command above. I suspect that this should succeed
> (not sure whether it would be before or after modifying
> /etc/imapd.conf!).

OK, here are the results after adding that entry to imapd.conf.  Note 
that I had to insert the "-m plain" here as well or it would fail 
outright.  The last one worked, but I got the same "Invalid mailbox" error:

IMAPD.CONF
-----------
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus root
allowanonymouslogin: no
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
tls_cert_file: /var/imap/server.pem
tls_key_file: /var/imap/server.pem
tls_session_timeout: 0
loginrealms: post.domain.com domain.com

==================================

[root at post etc]# imtest -u test at domain.com -a test -t '' -m plain 
localhost   S: * OK post.domain.com Cyrus IMAP4 v2.2.3 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 
STARTTLS AUTH=GSSAPI AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
C: S01 STARTTLS
S: S01 OK Begin TLS negotiation now
verify error:num=18:self signed certificate
TLS connection established: TLSv1 with cipher DES-CBC3-SHA (168/168 bits)
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 
AUTH=GSSAPI AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
Please enter your password:
C: A01 AUTHENTICATE PLAIN dGVzdEBzYXBlcmVvbi5jb20AdGVzdAB0ZXN0MTIz
S: A01 NO user not found
Authentication failed. generic failure
Security strength factor: 168

==================================

[root at post etc]# imtest -u test at domain.com -a test at domain.com -t '' -m 
plain localhost
S: * OK post.domain.com Cyrus IMAP4 v2.2.3 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 
STARTTLS AUTH=GSSAPI AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
C: S01 STARTTLS
S: S01 OK Begin TLS negotiation now
verify error:num=18:self signed certificate
TLS connection established: TLSv1 with cipher DES-CBC3-SHA (168/168 bits)
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 
AUTH=GSSAPI AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5 SASL-IR
S: C01 OK Completed
Please enter your password:
C: A01 AUTHENTICATE PLAIN 
dGVzdEBzYXBlcmVvbi5jb20AdGVzdEBzYXBlcmVvbi5jb20AdGVzdDEyMw==
S: A01 OK Success (tls protection)
Authenticated.
Security strength factor: 168
A01 select inbox
A01 NO Invalid mailbox name

==================================

So the last one here worked...sort of.  I am getting the same error that 
I am in the email client (i.e. Invalid mailbox name).  It's odd because:

[root at post etc]# ls -latr /var/spool/imap/user/test
total 20
-rw-------    1 cyrus    mail           76 Feb 17 09:16 cyrus.index
-rw-------    1 cyrus    mail            4 Feb 17 09:16 cyrus.cache
drwx------    3 cyrus    mail         4096 Feb 17 09:16 ..
-rw-------    1 cyrus    mail          159 Feb 17 09:16 cyrus.header
drwx------    2 cyrus    mail         4096 Feb 17 10:15 .

[root at post etc]# sasldblistusers2
test at domain.com: userPassword
cyrus at post.domain.com: userPassword

NOTE:  This does bring up an interesting question though:

I created the cyrus user as follows:

      saslpasswd2 -c -u post.mydomain.com cyrus

A sasldblistusers2 shows:

      test at mydomain.com: userPassword
      cyrus at post.mydomain.com: userPassword

NOTE: The user "test" in this case would be indicative of a normal mail 
user.  Cyrus of course is for administration purposes.

Does this look right?  I am concerned that including the hostname "post"
in the realm for the cyrus user and NOT including it in the realm for 
the test user will cause problems when creating mailboxes, etc. Should 
the administrator for cyrus (i.e. user cyrus) by in the same realm as 
the users or hostname.realm?

Thanks again for all the help...I am supposed to complete this project 
today and am doing everything I can to figure this out in between your 
posts.

Thanks!!!

-trichard


---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list