Jürgen Obermann
2012-Jan-02 14:33 UTC
[Dovecot] error bad file number with compressed mbox files
Hello, can dsync convert from compressed mbox to compressed mdbox format? When I use compressed mbox files, either with gzip or with bzip2, I can read the mails as usual, but I find the following errors in dovecots log file: imap(userxy): Error: nfs_flush_fcntl: fcntl(/home/hrz/userxy/Mail/mymbox.gz, F_RDLCK) failed: Bad file number imap(userxy): Error: nfs_flush_fcntl: fcntl(/home/hrz/userxy/Mail/mymbox.bz2, F_RDLCK) failed: Bad file number These errors also appear when I use dsync to convert the compressed mbox to mdbox format on a second dovecot server: /opt/local/bin/dsync -v -u userxy backup mdbox:/sanpool/mail/home/hrz/userxy/mdbox dsync(userxy): Error: nfs_flush_fcntl: fcntl(/home/hrz/userxy/Mail/mymbox.gz, F_RDLCK) failed: Bad file number But now dovecot does not find the mails in the folder mymbox.gz on the second dovecot server in mdbox format! The relevant part of the dovcot configuration is: # 2.0.16: /opt/local/etc/dovecot/dovecot.conf # OS: SunOS 5.10 sun4v mail_fsync = always mail_location = mbox:~/Mail:INBOX=/var/mail/%u mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = mail_log notify zlib mmap_disable = yes Thank you, -- J?rgen Obermann Hochschulrechenzentrum der Justus-Liebig-Universit?t Gie?en Heinrich-Buff-Ring 44 Tel. 0641-9913054
Timo Sirainen
2012-Jan-03 11:29 UTC
[Dovecot] error bad file number with compressed mbox files
On Mon, 2012-01-02 at 15:33 +0100, J?rgen Obermann wrote:> can dsync convert from compressed mbox to compressed mdbox format? > > When I use compressed mbox files, either with gzip or with bzip2, I can > read the mails as usual, but I find the following errors in dovecots log > file: > > imap(userxy): Error: nfs_flush_fcntl: > fcntl(/home/hrz/userxy/Mail/mymbox.gz, F_RDLCK) failed: Bad file number > imap(userxy): Error: nfs_flush_fcntl: > fcntl(/home/hrz/userxy/Mail/mymbox.bz2, F_RDLCK) failed: Bad file numberThis happens because of mail_nfs_* settings. You can either ignore those errors, or disable the settings. Those settings are useful only if you attempt to access the same mailbox from multiple servers at the same time, which is randomly going to fail even with those settings, so they aren't hugely useful.