doveadm import with subfolder oddity
Mark Moseley
moseleymark at gmail.com
Mon Feb 4 23:59:24 EET 2019
This has got to be something weird in my config. And the standard
disclaimer of '"happy to post doveconf -n, but wanted to see if this is
normal first" :)
Background: Ubuntu Xenial, running 2.2.36. Mailbox type is mdbox and I've
got a period separator in my inbox namespace:
namespace {
hidden = no
inbox = yes
list = yes
location =
mailbox Spam {
auto = no
autoexpunge = 1 weeks
special_use = \Junk
}
mailbox Trash {
auto = no
special_use = \Trash
}
prefix = INBOX.
separator = .
subscriptions = yes
type = private
}
If I do a import for a regular folder under INBOX, it works just fine:
doveadm import -u testbox2 at testing.local -U testbox1 at testing.local
mdbox:~/mdbox INBOX all mailbox Sent
... returns happily, message count gets incremented
If I try to do the same with a subfolder (and a subfolder that most
definitely exists on both source and destination side), I get an error:
doveadm import -u testbox2 at testing.local -U testbox1 at testing.local
mdbox:~/mdbox INBOX all mailbox Sub.Sub1
doveadm(testbox2 at testing.local): Error: remote(10.1.17.98:4000): Mailbox
Sub.Sub1: Mailbox sync failed: Mailbox doesn't exist: Sub.Sub1
If I use / instead of . in my query, it works:
doveadm import -u testbox2 at testing.local -U testbox1 at testing.local
mdbox:~/mdbox INBOX all mailbox Sub/Sub1
... returns happily and message count gets incremented.
Since we're using '.' as our separator, that was a bit unexpected :)
Ironically, if I'm doing a IMAPc 'import', it works just fine with a query
of 'all mailbox Sub.Sub1'. It's only when importing from a local src and
local dest (i.e. source_location == mdbox:~/mdbox) that it fails. With
source_location set to 'imapc:', it works. I imagine that's due to using
straight IMAP on the source side.
Likely a misconfig on my part? Expected behavior?
I can see in the strace that the error is triggered when doveadm is looking
at the source mailbox. It looks for mdbox/mailboxes/Sub.Sub1/dbox-Mails
first, then falls back to mdbox/mailboxes/Sub/Sub1/dbox-Mails (which it
finds). Then a little bit later in the strace, it again looks
for mdbox/mailboxes/Sub.Sub1/dbox-Mails (which it doesn't find) but doesn't
try mdbox/mailboxes/Sub/Sub1/dbox-Mails this time, and then spits out
'Mailbox Sub.Sub1: Mailbox sync failed: Mailbox doesn't exist: Sub.Sub1'.
With a query of 'all mailbox Sub/Sub1', the stat() is
for mdbox/mailboxes/Sub/Sub1/dbox-Mails which it finds and uses happily.
Having to substitute the '.'s for '/'s in the 'mailbox' part of the query
isn't an awful workaround, but it very much feels like I'm doing something
wrong. This is a production setup, so everything else is otherwise working
fine. But I've only just begun working with 'doveadm import', so I might be
turning up some issues with my config.
Thanks! Sorry I'm so verbose :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190204/7354464f/attachment-0001.html>
More information about the dovecot
mailing list