Administrator BCS
2014-Apr-29 08:49 UTC
[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 at BCS:pts/0)??????????????????????????????????????????????????????????????????????????????????????????????????????(~)??> ??(89:10:33:%)?? sudo doveadm -D import -u > techniek at bezoekerscentrumsonsbeek.nl > maildir:/mnt/multimedia/mailoudeserver/testmap/techniek > maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/ all > doveadm(root): Debug: Loading modules from directory: > /usr/lib/dovecot/modules/doveadm > doveadm(root): Debug: Skipping module doveadm_acl_plugin, because > dlopen() failed: > /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined > symbol: acl_user_module (this is usually intentional, so just ignore > this message) > doveadm(root): Debug: Skipping module doveadm_expire_plugin, because > dlopen() failed: > /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: > undefined symbol: expire_set_deinit (this is usually intentional, so > just ignore this message) > doveadm(root): Debug: Skipping module doveadm_quota_plugin, because > dlopen() failed: > /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: > undefined symbol: quota_user_module (this is usually intentional, so > just ignore this message) > doveadm(root): Debug: Skipping module doveadm_zlib_plugin, because > dlopen() failed: > /usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so: undefined > symbol: i_stream_create_deflate (this is usually intentional, so just > ignore this message) > doveadm(root): Debug: Effective uid=0, gid=0, home=/home/adje > doveadm(root): Debug: maildir++: > root=/mnt/multimedia/mailoudeserver/testmap/techniek, index=, control=, > inbox=/mnt/multimedia/mailoudeserver/testmap/techniek, alt> doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Added userdb > setting: mail=maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Added userdb > setting: plugin/quota=dirsize:storage=0 > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Effective uid=150, > gid=8, home=/home/vmail/bezoekerscentrumsonsbeek.nl/techniek > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: maildir++: > root=/home/vmail/bezoekerscentrumsonsbeek.nl/techniek, index=, control=, > inbox=/home/vmail/bezoekerscentrumsonsbeek.nl/techniek, alt> doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Namespace : >/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX doesn't exist yet, using default> permissions > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Namespace : Using > permissions from /home/vmail/bezoekerscentrumsonsbeek.nl/techniek: > mode=0700 gid=-1 > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Namespace : >/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX doesn't exist yet, using default> permissions > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Debug: Namespace : Using > permissions from /home/vmail/bezoekerscentrumsonsbeek.nl/techniek: > mode=0700 gid=-1 > doveadm(techniek at bezoekerscentrumsonsbeek.nl): Error: Couldn't create > mailbox maildir:/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.INBOX: > Invalid mailbox nameOutput of dovecot -n> # 2.0.19: /etc/dovecot/dovecot.conf > # OS: Linux 3.11.0-20-generic x86_64 Ubuntu 12.04.4 LTS ext4 > auth_mechanisms = plain login > first_valid_uid = 150 > last_valid_uid = 150 > mail_gid = mail > mail_location = maildir:/home/vmail/%d/%n > mail_uid = vmail > passdb { > ? args = /etc/dovecot/dovecot-sql.conf.ext > ? driver = sql > } > postmaster_address = adje at bezoekerscentrumsonsbeek.nl > protocols = " imap pop3" > service auth { > ? unix_listener /var/spool/postfix/private/auth { > ? ? group = postfix > ? ? mode = 0660 > ? ? user = postfix > ? } > ? unix_listener auth-userdb { > ? ? group = mail > ? ? mode = 0600 > ? ? user = vmail > ? } > } > ssl_cert = </etc/ssl/certs/dovecot.pem > ssl_key = </etc/ssl/private/dovecot.pem > userdb { > ? args = /etc/dovecot/dovecot-sql.conf.ext > ? driver = sql > }-- Systeembeheer Bezoekerscentrum Sonsbeek
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 29 Apr 2014, Administrator BCS wrote:> 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: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-----
Steffen Kaiser
2014-Apr-29 10:25 UTC
[Dovecot] doveadm import : Error creating new mailbox
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 29 Apr 2014, Administrator BCS wrote:> 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: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-----
Administrator BCS
2014-Apr-29 11:09 UTC
[Dovecot] doveadm import : Error creating new mailbox
Citeren Steffen Kaiser <skdovecot at smail.inf.fh-brs.de>:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 29 Apr 2014, Administrator BCS wrote: > >> 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: > > 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. >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.> - -- 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------- Systeembeheer Bezoekerscentrum Sonsbeek
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 29 Apr 2014, Administrator BCS wrote:>> mail_location = maildir:/home/vmail/%d/%n>> userdb { >> args = /etc/dovecot/dovecot-sql.conf.ext >> driver = sql >> }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-----
Steffen Kaiser
2014-Apr-29 13:14 UTC
[Dovecot] doveadm import : Error creating new mailbox
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 29 Apr 2014, Administrator BCS wrote:>> mail_location = maildir:/home/vmail/%d/%n>> userdb { >> ? args = /etc/dovecot/dovecot-sql.conf.ext >> ? driver = sql >> }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-----
Administrator BCS
2014-Apr-29 14:57 UTC
[Dovecot] doveadm import : Error creating new mailbox
Citeren Steffen Kaiser <skdovecot at smail.inf.fh-brs.de>:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 29 Apr 2014, Administrator BCS wrote: > >>> mail_location = maildir:/home/vmail/%d/%n > >>> userdb { >>> ? args = /etc/dovecot/dovecot-sql.conf.ext >>> ? driver = sql >>> } > > 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.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