[Dovecot] doveadm import : Error creating new mailbox
Hello,
I'm new to dovecot. I managed to set up a system running
dovecot/mysql/postfix/postfixadmin with a virtual maildir setup on
Ubuntu 12.04 I can add and remove users, send and receive mail, create
folders, move mail between them etc so all ok.
Now trying to manually import some mbox files from the old server into
dovecot. Copied a mbox file to the new system, converted it to Maildir
with mb2md resulting in a directory containing the new, cur en tmp.
Looks ok, old email messages are all there.
When importing this folder using doveadm import it fails with the message:
Error: Couldn't create mailbox
maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX:
Invalid mailbox name
What am I doing wrong?
Martin
output from doveadm -D import:
┌─(adje@BCS:pts/0)──────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX doesn't exist yet, using default
/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX doesn't exist yet, using default
Output of dovecot -n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 29 Apr 2014, Administrator BCS wrote:
Copy/move the files in cur and new into the new place, no need for doveadm import. If there is no target mailbox of that name, copy the whole .mailbox.sub.sub folder.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBU19+FHz1H7kL/d9rAQIc9Af7B1ecvA/GLNKF6luQSDjcenR1S9OYjVcn pAAgZTaWEjwp50pg8qdRGe3K5/lPmi9+ltGeQeoNzqfRi/4T902AopZ4JqFrbBUy oxZTvaKAKjTB9m0xor8S/fpWF4ZqEiEomuPRIS96/zCoJsJBDycEhSEn4/wU8U/a 1+D76Krd+RC33P12VsXvXFSiJ2ZuThH2Z82vtp8FCqmYZ8ZSxMyWXkRMy5qsLPoz 9QoGqSk2nOoSF9CXuLNmeLvqyEnBri18eLP0bIwYS7+a/V0uAJTYnSuG3tFbv2no e5P9dA6Vi2YtCNRYy3wbyuhZFWF7m47vwOXZIO52PjHQ4nbM4Z4F9w== =ngDh -----END PGP SIGNATURE-----
Citeren Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
well the example I gave was maybe a bit confusing. Moving/copying the
contents of folders works but only for already existing folders.
When I want to import folders that do not yet exist and create them by
copying a .mailbox folder to the users vmail folder it does not show
up in my front end (Horde). From what I learned so far this is because
I have to use the dovecot import tool in order to make dovecot
recognize them.
-- Systeembeheer Bezoekerscentrum Sonsbeek
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 29 Apr 2014, Administrator BCS wrote:
say mb2md creates: .folder.sub.sub/{cur,new,tmp} .....
move .folder.sub.sub to /home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.folder.sub.sub
If they does not show up, probably because they are not subscribed, add them to Maildir/subscriptions . Sometimes clients cache the folders. logoff/on again.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBU1+Tpnz1H7kL/d9rAQIc1ggAtMYCafYQyr317y7ixNvkXuXfnWBssDQC kMFGdKSOO1Efpdj1PMvwS3yZNdd93P02uSHRuoARKWQMwn46pPtkIgiesC3B1IcO DZiN0bg35iw3eenj3k0ZGol9HDZF2B8cE/6I8rqP2a6XANqLXBk4TB1HfmxcRGgp Uuu4nhv8ZPqee1J1oP8U1RqQ0gdeS0zlhXT8At6l+iqzRkcfmijxK+GJ2QVxceDT k+Hs3/QD/KNWpoWx6o/ClDIFVt6ALGw2hz622WL3tEv7Ytvy50E7FoVxbv6ET7Hr g5zacot+jjOxiwBSTxBzkpsg4yvZ1D6QEph+gnXSR6ishKEu/Aeddw== =xImh -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 29 Apr 2014, Administrator BCS wrote:
mail_location = maildir:/home/vmail/%d/%n
BTW: What home directory are you using? It is not recommended to run with mail (dir) == home (dir). Insofar, it might be better to add the pseudo standard Maildir to mail_location.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBU1+lv3z1H7kL/d9rAQJjYQf7BWeKttb2XQmc+2v6ZkdyiQ19JIFwsp2D iLZI9OVbNEh3+0Vv7EBGEzVGmuq2+o/7BzeSaHYzBOYJhC/5pIwAcfHet3uvbBGF /GdXMjfIuEM790H3mSamaNmmoz+HYlXtuqsEy0nFt2kRmvq+HveLpA62Z7fEOEn/ 8rPUxzR+44gNZrB24Xuigv5mfoqglm7HlpATnpWQlRJf+hbkjfZdZ/5qvyDEXI2x xmR3K9wJ43h5mqlMOi9QYZc6wLCLRl6v+rxtQcSajlZi6iAfzjCLeTYlqTQOz2AF XoEhTuQPWDpAEZpgb850pGZN43/wJfbumozF0TsMU3YJUR6snwXFxw== =/KAC -----END PGP SIGNATURE-----
Citeren Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>:
I don't know if I fully understand your question. I am trying to
import mail from an old system running mbox (inbox in
/var/mail/username and the rest in /home/username/mail/), to a new
system running Postfix/Dovecot with virtual mailboxes for separate
domains. So the mail users on the new system do not have a linux
account anymore and therefore no homedir either. Their mail is stored
by the virtual mail handler in /home/vmail/domain.nl/username/. Worth
mentioning maybe that initially it used /var/vmail/ but I moved it
from /var to /home for reasons of file system space and edited the
postfix- and dovecot configs accordingly.
As a test I copied some individual mbox files from the old system to a
temporary folder on the new one and tried to import those files to the
corresponding maildirs of the users on the new system using doveadm
import, which failed. Maybe it simply does not work that way and
should I go for the direct full mbox>maildir conversion from the old
server to the new one.
As you suggested earlier, copying to maildir converted box manually to
the vmail folders and editing the subscriptions file is a way to get
it to work but it is very labour intensive.
-- Systeembeheer Bezoekerscentrum Sonsbeek
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Administrator BCS wrote:
I'd suggested to _not_ import, but migrate the messages.
However, doveadm import -u user maildir:... "" all works for me, but my target user already has ~/Maildir/{new,cur,tmp}.
So the mail users on the new system do not have a linux account anymore and therefore no homedir either.
Well, maybe you could call the "homedirectory" in the sense of Dovecot as "directory where to put files relatively to by default', see http://wiki2.dovecot.org/MailLocation sec. "homeless useres".
I though mb2md supports "-d destdir", and to patch subscribe :
cd <<maildir>> echo INBOX >subscribe ls -d .??* |grep '^\.' | sed -e 's/^\.//' >>subscribe
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBU1/wx3D1/YhP6VMHAQKUbQgA7f8Ro3K6Z8BzWW5uOnAaWDOYPbacqWDF CRcHB0sqgSqWoOYnsB/ymL2fWqrK5dHmcDStU4PfiEimHM2eMhgJkGreSRbbT8Yw YYIwyRUjzewfFeZJU/BSzklhppctKUK+e2VghoiSgYDE1HsDr4SciBHzG82wKn/4 d30k4nCsWnUJ7P5bLUxtJFI1Qtdczi2Orcuhfc9jTEKaGv8rukvcl2b/BxJQKOSK XAQpHn9p4GhjJ7/jpHB8Nmz7JztKg0B0XdVjGRde2M10dzxL7R9isCJ3pcBn3b2y GKi/Axzo+jpHRrIVqsWs+YK3pX16rs/j7dCxuc6NaBqiE90wmDXRmQ== =ep+o -----END PGP SIGNATURE-----
participants (3)
-
Administrator BCS
-
Steffen
-
Steffen Kaiser