As I can currently only work with windows (eek) I thought I'd try dovecot there. I already sent a patch to make dovecot compile under cygwin, but it still doesn't really work, here's part of a session that I started while my maildir was totally empty (only cur/new/tmp in ~/Maildir)
$ ./imap.exe
- PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as jmberg A01 SELECT INBOX imap(jmberg): Warning: Compressing cache file /home/jmberg/Maildir/dovecot.index.cache imap(jmberg): Error: open() failed with file /home/jmberg/Maildir/dovecot.index.tmp: Permission denied A01 NO Internal error occured. Refer to server log for more information. [2004-12-17 15:51:06] A02 LOGOUT
- BYE Logging out A02 OK Logout completed.
A second session (some files were created by the first) yields this:
$ ./imap.exe
- PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as jmberg A01 SELECT INBOX imap(jmberg): Error: open() failed with file /home/jmberg/Maildir/dovecot.index.tmp: Permission denied imap(jmberg): Error: rename(/home/jmberg/Maildir/dovecot.index.tmp, /home/jmberg/Maildir/dovecot.index) failed: Permission denied A01 NO Internal error occured. Refer to server log for more information. [2004-12-17 15:52:25] A02 LOGOUT
- BYE Logging out A02 OK Logout completed.
I think this is probably due to the indexing code opening the .tmp file and then unlinking it and trying to re-create it while the first is still open. Or something, I really am not sure. *Maybe* the index code might be made work if it creates a new temporary file-name every time it re-creates the file, but I don't understand the code well enough (yet) to give a better analysis of the problem.
However, I do not think that this is really important. I certainly don't want to run dovecot on windows (I only saw cygwin compile in the todo and since I have a cygwin setup anyway I thought I'd try). The whole thing doesn't work anyway:
[after correcting users, making directories, make install...] $ /usr/local/sbin/dovecot.exe dovecot: Dec 17 16:03:17 Info: Dovecot v1.0-test58 starting up dovecot: Dec 17 16:03:18 Error: login: fd_read() failed: Function not implemented dovecot: Dec 17 16:03:18 Error: close(mail client) failed: Bad file descriptor dovecot: Dec 17 16:03:18 Error: Login process died too early - shutting down dovecot: Dec 17 16:03:18 Error: imap-login: dovecot: Dec 17 16:03:18 Fatal: setrlimit(RLIMIT_DATA, 32): Invalid argument dovecot: Dec 17 16:03:18 Error: login: fd_read() failed: Function not implemented dovecot: Dec 17 16:03:18 Error: close(mail client) failed: Bad file descriptor dovecot: Dec 17 16:03:18 Error: imap-login: dovecot: Dec 17 16:03:18 Fatal: setrlimit(RLIMIT_DATA, 32): Invalid argument dovecot: Dec 17 16:03:18 Error: login: fd_read() failed: Function not implemented dovecot: Dec 17 16:03:18 Error: close(mail client) failed: Bad file descriptor dovecot: Dec 17 16:03:18 Error: imap-login: dovecot: Dec 17 16:03:18 Fatal: setrlimit(RLIMIT_DATA, 32): Invalid argument dovecot: Dec 17 16:03:18 Error: auth(default): dovecot: Dec 17 16:03:18 Fatal: setrlimit(RLIMIT_DATA, 256): Invalid argument dovecot: Dec 17 16:03:18 Error: child 2176 (auth) returned error 89 dovecot: Dec 17 16:03:18 Error: child 2192 (login) returned error 89 dovecot: Dec 17 16:03:18 Error: child 2212 (login) returned error 89 dovecot: Dec 17 16:03:18 Error: child 2232 (login) returned error 89
Maybe someone cares. If not, well, I had a less boring train ride ;)
johannes
On Fri, 2004-12-17 at 16:43 +0100, Johannes Berg wrote:
/home/jmberg/Maildir/dovecot.index.tmp: Permission denied imap(jmberg): Error: rename(/home/jmberg/Maildir/dovecot.index.tmp, .. I think this is probably due to the indexing code opening the .tmp file and then unlinking it and trying to re-create it while the first is still open. Or something, I really am not sure.
Yes, that's it.
*Maybe* the index code might be made work if it creates a new temporary file-name every time it re-creates the file, but I don't understand the code well enough (yet) to give a better analysis of the problem.
For dovecot.index.tmp that would work, but then there's also dovecot.index.log.newlock which works as a lock file, it can't be renamed. It could probably be fixed just by closing all the fds to the file before rename().
Anyway both solutions get a bit kludgy. Perhaps I could do them with some #ifdef CYGWIN, but I don't really want to fix those myself.
participants (2)
-
Johannes Berg
-
Timo Sirainen