doveadm import/sync with read-only source location

Timo Sirainen tss at iki.fi
Sat Nov 21 01:35:30 UTC 2015


On 17 Nov 2015, at 13:03, Anton Cheyvhchalov <ac at stacksoft.ru> wrote:
> 
> 
> +1 to that idea.
> 
> Ask the same couple month before during migration from 1.x to 2.x but got no answer from someone who able to change this. 

Troublesome.. Probably nicest way to implement this would be to add a new "maildir_lock_method" setting, which defaults to dotlock as it is now, but could be changed to fcntl/flock similar to as with mbox. I think fcntl/flock would work with read-only filesystems as well. This feature would also improve performance for most setups. It's something I've had in my mind a long time. But it's not really important enough, especially because people who care about performance would use sdbox/mdbox anyway. I'm happy to get a patch implementing it though.

> On Tue, 17 Nov 2015 10:35:11 +0200
> Teodor Milkov <tm at del.bg> wrote:
> 
>> Hello,
>> 
>> Currently doveadm tool can't be used with read-only source locations 
>> because it's trying to create lock files.
>> 
>> I'd guess lock files shouldn't be necessary on a read-only media, 
>> because no one else is going to change anything while our doveadm 
>> instance is running anyway. Example:
>> 
>> doveadm import -u test at example.com 
>> maildir:/backup.0/domains/example.com/postmaster/Maildir restored ALL
>> doveadm(test at example.com): Error: 
>> open(/backup.0/domains/example.com/postmaster/Maildir/.Trash/dovecot-uidlist.lock) 
>> failed: Read-only file system
>> 
>> Perhaps this should be something like doveadm backup -R flag, but in the 
>> opposite direction – i.e. we have a [full] backup command, but no 
>> [partial] restore command right now. Or am I missing something?
>> 
>> Best regards,
>> Teodor



More information about the dovecot mailing list