dsync confusion

Aki Tuomi aki.tuomi at open-xchange.com
Tue Jul 12 06:55:04 UTC 2022


> On 12/07/2022 08:36 EEST dovecot at chubb.wattle.id.au wrote:
> 
>  
> Hi Folks,
>    The man page for doveadm-sync says that the final argument is the
>    destination to which files will be written.
> 
>    But the example later in the man page says the opposite.
>    Under 'Conversion' I read:
> 
>       ```
>       Assuming that the mail_location setting in
>       /etc/dovecot/conf.d/10-mail.conf is set to:
>           mail_location = mdbox:~/mdbox,
>       a logged in system user may convert her/his mails
>       from its Maildir in her/his home directory to the mdbox mailbox
>       format.  The user has to execute the command:
> 
>               doveadm sync maildir:~/Maildir
>       ```
> 
>    which has the destination in /etc/dovecot/conf.d and the _source_ as
>    the final argument to doveadm sync.
> 
> 
>    It seems on trying it, that the example doesn't work.
>    To convert from, say mbox to Maildir, I had to do:
>      doveadm backup 'maildir:~/Maildir:LAYOUT=fs'
>    with /etc/dovecot containing
>      mail_location = mbox:~/Mail/:INBOX=/var/mail/%u:INDEX=/var/indices/%u
> 

This is working exactly as documented. Mbox is the *source* and maildir is the *destination*, since you are using 'backup' not 'sync' command.

> 
>    Even this didn't work properly for me.  All the messages from all
>    the mboxen in ~/Mail ended up in ~/Maildir/cur and the other mailboxes
>    ended up with empty cur/ and new/ directories under ~/Maildir/xxx/
> 
>    Dovecot version 2.3.19.1 (9b53102964)
>    installed from Debian sid on x86_64.
>    Home directories are NFS mounted.
>    I don't think the rest of the config is relevant.
> 
> -- 
> Peter Chubb

Can you try running `doveadm -D sync maildir:~/Maildir:LAYOUT=fs` after deleting your previous attempt?

Aki


More information about the dovecot mailing list