Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cyrus now ganked after switching to auxprop and autocreate
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dbishop
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2007
Posts: 99

PostPosted: Wed Sep 25, 2013 2:28 pm    Post subject: Cyrus now ganked after switching to auxprop and autocreate Reply with quote

Hi All,

Just followed http://whitehathouston.com/documentation/gentoo/postfix_cyrus_vhost_howto.htm. Looks like MySQL auth is working but Cyrus now reports a ton of errors to the various mail clients. It seems like it can no longer understand its own database layout. It appears that the partition-default directory structure is all there, but it cannot find the existing mail structures anymore. I have a feeling it has to do with the fact that I sidelined my original imapd.conf in favor of whitehathouston.com's. I originally had

Code:
unixhierarchysep:  1                                                           
altnamespace:      1


but missed them when I changed to the imapd.conf from the tutorial. I retsarted Cyrus initaially without them and then noticed in the logs that every user that logged in or got mail that was in the database got a new mailbox created.

If memory serves, these make Cyrus use /'s instead of .'s when traversing its database heirarchy. I did this so long ago I just don;'t remember why anymore, but I am sure it seemed like a good idea at the time. I noticed in the logs that every user that logged in got a new mailbox created using the dot notation and now no one can see any of their mail anymore. I added those two lines back in, but now Evolution (my fav mail client) reports 'system errors' and asks me to choose an inbox. Thunderbird and Squirrelmail report same error (more-or-less).

Also I can no longer log into cyradm as the root user, logs just say 'sql plugin: no result found' and 'badlogin: localhost [127.0.0.1] LOGIN [SASL(-13): user not found: checkpass failed]', although the other users can log in, just can't see their old mail.

Can anyone help me dig out from the mess I have made?
Back to top
View user's profile Send private message
dbishop
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2007
Posts: 99

PostPosted: Thu Sep 26, 2013 6:16 pm    Post subject: Reply with quote

The issue related to cyradm not allowing the cyrus admin user had to do with the way the query was being sent to mysql. For all users except the admin user, the query was user@hostname.org but for the cyrus root user it was being queried as admin@hostname. Had some work to do with syslog-ng to get all the cyrus messages to show up in a cyrus.log file.

The next issue has to do with the fact that I was implementing the above-linked howto on an existing cyrus install rather than from ground up. I have been running cyrus for 10 years, and in all that time it has been trouble-free, through various upgrades and moves across machines. That relative peace is why I am really lost now. I have never had problems before so I have zero troubleshooting skills with these packages (postfix/cyrus).

One issue was that the howto enabled virtual servers. That had a few unanticipated side effects, along with using autocreate. In combination I believe that's what trashed my server's indexes and database.

The howto is correct in that anyone who is in the database but does not have an account gets one. So, if user@mailserver.net is in the database but has no account one is indeed autocreated (assuming you've patched cyrus). But if a mail comes in for USER@mailserver.net, mysql will authenticate it, but cyrus will autocreate the new account. And again for UsEr@MaIlsever.NET... you get the point. Case doesn't matter for authentication but every variation will get an autrocreated mailbox. This has led to problem #1.

The next problem was that the howto did not specify the unixhierarchysep=1 which is what my server was set up using, and I forgot to add that back to imapd.conf before firing up cyrus. I suppose all would have been well if autocreate didn't create about 5 new mailboxes for every account due to character-case variations -- and virtual sever setting (some mailboxes now have a MAILSERVER.NET! and some do not).

I have tried many variations of reconstructing mailboxes, getting rid of old indexes, and even recreating the main cyrus database in /var/imap. Nothing is working.

All the email files are safe, and so is the directory structure. I just can't rebuild the mailboxes so that cyrus (and external mail clients) can use them.

Cyrus just echoes
Code:
IOERROR: opening index mailserver.net!user.donquixote: System I/O error

for every single mailbox.

Any ideas how to get cyrus working again? Anyone?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum