User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040721 Build Identifier: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040721 I have set up Cyrus-IMAP server with virtual domains, and migrated my mailbox'es to the default domain. Things works if I disable virtual domains. However, enabling virtual domains I get the following error: Mailbox does not exist. Tried: 1. Added a virtual domain mailbox, firstname.lastname@example.org: There is no problem reading mail for that account (login: me%example.com). 2. Tried other client, Squirrelmail: Access to both defaultdomain account and email@example.com. 3. Disabled virtual domains: access to my default domain, no access to firstname.lastname@example.org (expected). 4. Specified login to defaultdomain account as 'me', me@defaultdomain and me%defaultdomain. None works when virtual domains are enabled. 5. Changed default domain: Cyrus fails. 6. Uncommented 'defaultdomain' config line in imapd.conf: cyrus fails. I cannot completely exclude a bug in cyrus-imapd since imapd does not accept other default domains than the hostname's domain. However the fact that things work with Squirrelmail makes me suspect an error in Mozilla MailNews. Server info: cyrus-imap 2.2.8, cyrus-sasl 2.1.19, cyrus-sasl-saslauthd 2.1.19, OS: FreeBSD 4.10. Reproducible: Always Steps to Reproduce: 1. Setup cyrus-imap v. 2.2.8: my imapd.conf is as follows: -------- imapd.conf --------- configdirectory: /var/imap partition-default: /var/imap/spool altnamespace: yes defaultdomain: daemonsecurity.com virtdomains: yes allowplaintext: yes admins: cyrus root defaultacl: anyone lrs sieveusehomedir: false sievedir: /var/imap/sieve sasl_pwcheck_method: saslauthd sasl_mech_list: plain cram-md5 digest-md5 ---------- fire up imapd. 2. Create a mailbox for the default domain eg. using cyradm, (add some mail, but not sure if need to test). 3. Create account in Mozilla MailNews - normal procedure. 4. Open the inbox folder. Actual Results: Failure: Mailbox does not exist From the log: I can see that authentication succeeds. Expected Results: MailNews should create a list of available folders and fetch messages for the inbox.
Workarround: I have found a workarround: As noted in 5) cyrus fails, I changed defaultdomain. Removing my domain from /etc/hosts allows to **** an alternate default domain, and hence setup the original default domain as a virtual domain: In /etc/hosts: ::1 localhost 127.0.0.1 localhost In imapd.conf: defaultdomain: localhost The "Mailbox does not exits" error persists, but now with @localhost mailboxes which at least provides a working solution.
a client side imap protocol log of a failed session would be helpful: http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap thx.
Created attachment 156238 [details] Log output This log contains client and server side log (server side is a bit sparce). First part is the client side log, shows unsuccesfull opening of mailbox for default domain (example.com), then succesfull opening of mailbox for virtual domain (virtualdomain.com). Second part is the server side log of the above connections.
in the virtual domain case, you'll see there's no personal namespace : NAMESPACE NIL, and selecting the INBOX fails. I don't see the client doing anything wrong - it seems like there is no INBOX or even personal namespace for the account when you turn on virtual domains...
except perhaps we shouldn't try to select the INBOX where there's no personal namespace, I guess. Do you expect that there should be an INBOX?
Created attachment 156267 [details] mbox2imap batch migration tool I created all mailfolders using this script for batch migration: ./mbox2imap.pl norgaard ./mbox2imap.pl email@example.com This creates one mail account in the default domain, 'example.com', and another in the virtual domain 'virtualdomain.com'. Both contain the same mail, the same folders etc. I can log in using Squirrelmail, and check mail, delete mail etc. for both accounts. In squirrelmail if I log in as 'norgaard', 'norgaard%example.com' and 'firstname.lastname@example.org' all sends me to the same namespace/mailaccount belonging to the default domain's namespace. If I log in as 'norgaard%virtualdomain.com' or 'email@example.com' I get the other mail account. This is all as I would expect. Doing the same using the mozilla mail, I only get access to the virtualdomain account. The interesting thing is that if I disable virtual domains, then I have normal access to the account in the default domain namespace (and obviously not access to the virtual domain). To me, this confirms that the INBOX does indeed exist. If I try to 'subscribe', I see no folders or subfolders, even though they exist.
If you'll look at the protocol log, you'll see that the server is telling us there's no INBOX: 148844032[8d9ea00]: 84b7000:top.example.com:A:SendData: 7 select "INBOX" 148844032[8d9ea00]: ReadNextLine [stream=8bd8d08 nb=29 needmore=0] 148844032[8d9ea00]: 84b7000:top.example.com:A:CreateNewLineFromSocket: 7 NO Mailbox does not exist It seems like the default domain logon would be the simplest - we just pass in the username. I don't see how Mozilla could be doing anything wrong in that scenario. Are you changing the username in the account settings UI or by using about:config/editing prefs.js by hand? Unfortunately, for privacy reasons, our protocol log doesn't show the user name that gets sent...
> I don't see how Mozilla could be doing anything wrong in that scenario. > Are you changing the username in the account settings UI or by using > about:config/editing prefs.js by hand? No, I have created the accounts through the normal interface. The error "Mailbox does not exist" seems to be a consequence of the lacking namespace. I did a sniffing on the packets and tried to replay the connection by hand using telnet, and I can only confirm the mozilla log. I didn't exclude the posibility that it's an cyrus-imap bug, and I have posted on the cyrus mailing list. I am experiencing wierd things with cyrus (in particular squirrelmail no longer works?!) so I am less certain that this is a mozilla bug. I'll return when I know more from the cyrus people. Thanks for your time, and sorry if I have wasted it. Erik
Hi there, I haven't got any news from the Cyrus people, but this morning it occured to me: If I can't select the mailbox, how on earth did I get the mail in there in the first place? My migration script transfers mail using the imap protocol, and for performance it connects to localhost. So I tried telnetting to localhost, and the default domain works. While connecting on the normal interface returns namespace NIL. This explains why I could have Squirrellmail working since it was running on the same host (and it stopped working because I for some reason decided to change the server address). So, I conclude that this is not a bug in Mozilla mail. I am really sorry for taking your time, this bug is beyond normal obscurity I think. For your interest I have included the two telnet sessions below... Best regards, and thanks. Erik Mystery deepens... Here is what I got: Telnetsession on loopback interface: [norgaard@top norgaard]$ telnet 127.0.0.1 143 Trying 127.0.0.1... Connected to localhost.example.com. Escape character is '^]'. * OK top.example.com Cyrus IMAP4 v2.2.8 server ready 1 login "firstname.lastname@example.org" ****** 1 OK User logged in 2 namespace * NAMESPACE (("" ".")) (("Other Users." ".")) (("Shared Folders." ".")) 2 OK Completed Telnet session on real interface: [norgaard@top norgaard]$ telnet 192.168.0.4 143 Trying 192.168.0.4... Connected to top.168.192.in-addr.arpa. Escape character is '^]'. * OK top.example.com Cyrus IMAP4 v2.2.8 server ready 1 login "email@example.com" ****** 1 OK User logged in 2 namespace * NAMESPACE NIL (("Other Users." ".")) (("Shared Folders." ".")) 2 OK Completed
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
No bug / patch referenced. From the comments, this doesn't seem like a bug with Mozilla code anyway. -> WORKSFORME
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago → 14 years ago
Resolution: --- → WORKSFORME
Eric, no problem; glad you've figured it out to some extent. If you figure out what's going on with Cyrus, maybe you could append that info here, and if someone else has the same problem, I can point them to the info.
I have finally traced the problem in case anyone should ask. It would be quite wierd if cyrus took special care for the loopback interface, and it doesn't. Cyrus does a reverse lookup on the ip that recieves the incoming connection. The returned hostname must be one under the default domain. So the solution to that kind of problem is to get reverse dns right, or add entries to /etc/hosts. From the cyrus mailinglist I was finally told, > Use: > > virtdomains: userid > and it won't do this. The reverse lookup is to support configs where > each virtdomain is serviced by a particular IP. But then all would have to login with a fully qualified login. This behaviour is perfectly fine (I think) if there was no default domain specified, but otherwise I would expect cyrus to assume the default domain. So, not only am I now embarassed to admit that the problem was local, worse, I have also now found that the 'reverse lookup' was actually documented :-( However, I still think a specified default domain should take precedence. Thanks again, at least I learned something about the IMAP protocal :-) Regards, Erik
You need to log in before you can comment on or make changes to this bug.