[Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
Hello,
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
dovecot -n
# 2.1.6: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.2-RELEASE i386 ufs
auth_cache_ttl = 14 mins
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain gssapi login
auth_use_winbind = yes
auth_verbose = yes
auth_winbind_helper_path = /usr/local/bin/ntlm_auth
first_valid_gid = 1001
first_valid_uid = 1001
info_log_path = /var/log/dovecot_info.log
last_valid_gid = 1001
last_valid_uid = 1001
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:/usr/data/vmail/%u
mail_max_userip_connections = 30
mail_privileged_group = mail
passdb {
args = /usr/local/etc/dovecot-ldap.conf
driver = ldap
}
plugin {
sieve = /usr/data/sieve-scripts/%u.sieve
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
mode = 0600
}
user = root
}
ssl_cert =
ssl_key =
userdb {
args = uid=vmail gid=vmail home=/usr/data/vmail/%u
driver = static
}
valid_chroot_dirs = /usr/data/vmail
verbose_proctitle = yes
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
protocol pop3 {
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
mail_plugins = sieve
sendmail_path = /usr/sbin/sendmail
}
Your assistance is greatly appreciated.
David Varela
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 15 Aug 2013, David Varela wrote:
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
The user is gone from passdb already, right? Re-create the entry with another password or password-locked.
Or, move the directories on filesystem level, e.g. something like:
cd user-Maildir-basedirectory rename 's/\A(\.[^.].*)/.usr_XYZ$1/' .[^.]* mkdir -p .usr_XYZ.INBOX/{new,cur,tmp} touch .usr_XYZ.INBOX/maildirfolder chown -R vmail:vmail .usr_XYZ.INBOX mv .usr_XYZ* manage-Maildir-basedirectory
.usr_XYZ is a prefix for a mail folder hierarchie identifying the user. vmail:vmail are the necessary Unix owner/group for the newly created directories with mkdir two lines above. The rename command renames all directory entries that start with a single dot to have the prefix, that should be directories only in a Maildir.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUg3HrF3r2wJMiz2NAQL1pQf9GeIEnLfG0zkFXPJ/J2CB/wmGP4m/MCMp BHxkRiLxXNezK4ckeliaLbpOD+NVyABc2n33tW11qav6IWrLTiGm9+A5p8TUOhfJ wMWBNJ0TEjtTM+0EbGJlOhkQ0QFooobfc5Sl30qR02yF+vk+SkBdRpkZK7ulpSPf 0ZtwIFF804NzMaKzZP2/SG77Z6JyW1N/TgaJ8QFtZwPrYymzD3iqtaFgoBAZqpSA g5koZIen0wjHy905Sy+uLseAFj6UIuhVdN8eG18NibaTHRBct3rTeyWAQY8GVZLq pPggEdUqHeTvrua5CzrL70iDbdcr29xezlvkxRueeDrGOApIprN4Mg== =1T6x -----END PGP SIGNATURE-----
Thanks Steffan,
I will test the move at the filesystem level.
The virtual user still exists, although I have changed her password. Dovecot is configured to authenticate users via LDAP to Active Directory. If there's a better method of moving maildir via Dovecot rather than through the filesystem I would like to do so.
Thanks,
David
-----Original Message----- From: Steffen Kaiser [mailto:skdovecot@smail.inf.fh-brs.de] Sent: Friday, August 16, 2013 12:33 AM To: David Varela Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 15 Aug 2013, David Varela wrote:
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
The user is gone from passdb already, right? Re-create the entry with another password or password-locked.
Or, move the directories on filesystem level, e.g. something like:
cd user-Maildir-basedirectory rename 's/\A(\.[^.].*)/.usr_XYZ$1/' .[^.]* mkdir -p .usr_XYZ.INBOX/{new,cur,tmp} touch .usr_XYZ.INBOX/maildirfolder chown -R vmail:vmail .usr_XYZ.INBOX mv .usr_XYZ* manage-Maildir-basedirectory
.usr_XYZ is a prefix for a mail folder hierarchie identifying the user. vmail:vmail are the necessary Unix owner/group for the newly created directories with mkdir two lines above. The rename command renames all directory entries that start with a single dot to have the prefix, that should be directories only in a Maildir.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUg3HrF3r2wJMiz2NAQL1pQf9GeIEnLfG0zkFXPJ/J2CB/wmGP4m/MCMp BHxkRiLxXNezK4ckeliaLbpOD+NVyABc2n33tW11qav6IWrLTiGm9+A5p8TUOhfJ wMWBNJ0TEjtTM+0EbGJlOhkQ0QFooobfc5Sl30qR02yF+vk+SkBdRpkZK7ulpSPf 0ZtwIFF804NzMaKzZP2/SG77Z6JyW1N/TgaJ8QFtZwPrYymzD3iqtaFgoBAZqpSA g5koZIen0wjHy905Sy+uLseAFj6UIuhVdN8eG18NibaTHRBct3rTeyWAQY8GVZLq pPggEdUqHeTvrua5CzrL70iDbdcr29xezlvkxRueeDrGOApIprN4Mg== =1T6x -----END PGP SIGNATURE-----
Good morning,
I tried the command provided by Steffan, however, although it runs and moves the files beginning with . to the destination maildir other directories and files in the previous users' maildir remained in the original location, and messages in the new users' maildir are not visible in the client.
Thanks,
David
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of David Varela Sent: Friday, August 16, 2013 7:13 AM To: dovecot@dovecot.org Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
Thanks Steffan,
I will test the move at the filesystem level.
The virtual user still exists, although I have changed her password. Dovecot is configured to authenticate users via LDAP to Active Directory. If there's a better method of moving maildir via Dovecot rather than through the filesystem I would like to do so.
Thanks,
David
-----Original Message----- From: Steffen Kaiser [mailto:skdovecot@smail.inf.fh-brs.de] Sent: Friday, August 16, 2013 12:33 AM To: David Varela Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 15 Aug 2013, David Varela wrote:
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
The user is gone from passdb already, right? Re-create the entry with another password or password-locked.
Or, move the directories on filesystem level, e.g. something like:
cd user-Maildir-basedirectory rename 's/\A(\.[^.].*)/.usr_XYZ$1/' .[^.]* mkdir -p .usr_XYZ.INBOX/{new,cur,tmp} touch .usr_XYZ.INBOX/maildirfolder chown -R vmail:vmail .usr_XYZ.INBOX mv .usr_XYZ* manage-Maildir-basedirectory
.usr_XYZ is a prefix for a mail folder hierarchie identifying the user. vmail:vmail are the necessary Unix owner/group for the newly created directories with mkdir two lines above. The rename command renames all directory entries that start with a single dot to have the prefix, that should be directories only in a Maildir.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUg3HrF3r2wJMiz2NAQL1pQf9GeIEnLfG0zkFXPJ/J2CB/wmGP4m/MCMp BHxkRiLxXNezK4ckeliaLbpOD+NVyABc2n33tW11qav6IWrLTiGm9+A5p8TUOhfJ wMWBNJ0TEjtTM+0EbGJlOhkQ0QFooobfc5Sl30qR02yF+vk+SkBdRpkZK7ulpSPf 0ZtwIFF804NzMaKzZP2/SG77Z6JyW1N/TgaJ8QFtZwPrYymzD3iqtaFgoBAZqpSA g5koZIen0wjHy905Sy+uLseAFj6UIuhVdN8eG18NibaTHRBct3rTeyWAQY8GVZLq pPggEdUqHeTvrua5CzrL70iDbdcr29xezlvkxRueeDrGOApIprN4Mg== =1T6x -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 22 Aug 2013, David Varela wrote:
I tried the command provided by Steffan, however, although it runs and moves the files beginning with . to the destination maildir other directories and files in the previous users' maildir remained in the original location, and messages in the new users' maildir are not visible in the client.
does the old Maildir still contains new/cur folders? move them into .usr_XYZ.INBOX; Maildir/new and Maildir/cur hold the INBOX.
The manager's Maildir should look like:
Maildir /new /cur /tmp /.Folder1.subfolder2... /new /cur /tmp /.usr_XYZ.usrFolder /new /cur /tmp
If the manager has a Maildir/.usr_XYZ.usrFolder/cur and Maildir/.usr_XYZ.usrFolder/new and at least one file is in either new or cur _and_ the manager is either displaying all folders or has usr_XYZ.usrFolder subscribed, this messages are to display in the MUA.
sometimes one need to refresh the list of folders or something like that.
Do the filesystem permission fit?
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of David Varela Sent: Friday, August 16, 2013 7:13 AM To: dovecot@dovecot.org Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
Thanks Steffan,
I will test the move at the filesystem level.
The virtual user still exists, although I have changed her password. Dovecot is configured to authenticate users via LDAP to Active Directory. If there's a better method of moving maildir via Dovecot rather than through the filesystem I would like to do so.
Thanks,
David
-----Original Message----- From: Steffen Kaiser [mailto:skdovecot@smail.inf.fh-brs.de] Sent: Friday, August 16, 2013 12:33 AM To: David Varela Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 15 Aug 2013, David Varela wrote:
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
The user is gone from passdb already, right? Re-create the entry with another password or password-locked.
Or, move the directories on filesystem level, e.g. something like:
cd user-Maildir-basedirectory rename 's/\A(\.[^.].*)/.usr_XYZ$1/' .[^.]* mkdir -p .usr_XYZ.INBOX/{new,cur,tmp} touch .usr_XYZ.INBOX/maildirfolder chown -R vmail:vmail .usr_XYZ.INBOX mv .usr_XYZ* manage-Maildir-basedirectory
.usr_XYZ is a prefix for a mail folder hierarchie identifying the user. vmail:vmail are the necessary Unix owner/group for the newly created directories with mkdir two lines above. The rename command renames all directory entries that start with a single dot to have the prefix, that should be directories only in a Maildir.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUg3HrF3r2wJMiz2NAQL1pQf9GeIEnLfG0zkFXPJ/J2CB/wmGP4m/MCMp BHxkRiLxXNezK4ckeliaLbpOD+NVyABc2n33tW11qav6IWrLTiGm9+A5p8TUOhfJ wMWBNJ0TEjtTM+0EbGJlOhkQ0QFooobfc5Sl30qR02yF+vk+SkBdRpkZK7ulpSPf 0ZtwIFF804NzMaKzZP2/SG77Z6JyW1N/TgaJ8QFtZwPrYymzD3iqtaFgoBAZqpSA g5koZIen0wjHy905Sy+uLseAFj6UIuhVdN8eG18NibaTHRBct3rTeyWAQY8GVZLq pPggEdUqHeTvrua5CzrL70iDbdcr29xezlvkxRueeDrGOApIprN4Mg== =1T6x -----END PGP SIGNATURE----- ---------------Output of GPG------------------ Decryption of block failed gpg: Signature made Fri 16 Aug 2013 08:33:16 AM CEST using RSA key ID 4C8B3D8D gpg: BAD signature from "Steffen Kaiser skdovecot@smail.inf.fh-brs.de"
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUhb1G13r2wJMiz2NAQKGOQf/Ycy/V+BOwg8Rk8geK+dALq+up321E6L1 bz7yhM/NnFklEoEH4vicGguFbpa+g42yo8FO6uAO22qTPD1Zf3VQFtMJs4zQPy52 zhl+F+7DGc0g27+tVcq/dqw7GRIT0nEXweo3FfYeTPHRozfTGqj73Ec8QvtGNkeU tt8T03om8ZDjHsvC1kH3Ta5eQyqrJxOYwkttOPVj8zsg3YfNim/Ejgb9cB4bZT+s 7cP5ySlHRKDQW/UkPcQaZKVZBxumPQNdV/HfY0LuANyTc0L7/8kQ4ly7TAKoFYhY mKPIdpPF4mCkRgx8v9PfpGZ7aZnI1DwED2nQYaheWcwH1Z6DukLn1A== =UtvU -----END PGP SIGNATURE-----
Thanks Steffen,
Yes, the old Maildir contains cur and new with email in each. The manager's maildir looks like:
Maildir /new /cur /tmp /.INBOX.subfolder /new /cur /tmp /.INBOX.usr_XYZ.usrFolder /new /cur /tmp /.INBOX.subfolder(s)
I tried to copy OldMaildir/cur to NewMaildir/.INBOX.usr_XYZ.usrFolder/cur but the MUA generates errors that it could not update headers and the IMAP server severed the connection. In addition, the MUA does not display the subfolders for the old maildir although they are listed on the server.
Thanks,
David
-----Original Message----- From: Steffen Kaiser [mailto:skdovecot@smail.inf.fh-brs.de] Sent: Thursday, August 22, 2013 11:38 PM To: David Varela Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 22 Aug 2013, David Varela wrote:
I tried the command provided by Steffan, however, although it runs and moves the files beginning with . to the destination maildir other directories and files in the previous users' maildir remained in the original location, and messages in the new users' maildir are not visible in the client.
does the old Maildir still contains new/cur folders? move them into .usr_XYZ.INBOX; Maildir/new and Maildir/cur hold the INBOX.
The manager's Maildir should look like:
Maildir /new /cur /tmp /.Folder1.subfolder2... /new /cur /tmp /.usr_XYZ.usrFolder /new /cur /tmp
If the manager has a Maildir/.usr_XYZ.usrFolder/cur and Maildir/.usr_XYZ.usrFolder/new and at least one file is in either new or cur _and_ the manager is either displaying all folders or has usr_XYZ.usrFolder subscribed, this messages are to display in the MUA.
sometimes one need to refresh the list of folders or something like that.
Do the filesystem permission fit?
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of David Varela Sent: Friday, August 16, 2013 7:13 AM To: dovecot@dovecot.org Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
Thanks Steffan,
I will test the move at the filesystem level.
The virtual user still exists, although I have changed her password. Dovecot is configured to authenticate users via LDAP to Active Directory. If there's a better method of moving maildir via Dovecot rather than through the filesystem I would like to do so.
Thanks,
David
-----Original Message----- From: Steffen Kaiser [mailto:skdovecot@smail.inf.fh-brs.de] Sent: Friday, August 16, 2013 12:33 AM To: David Varela Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] Nee assistance with migrating/copying a virtual user's maildir to another virtual user
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 15 Aug 2013, David Varela wrote:
I am trying to move/copy a virtual user's maildir to another virtual user but am running into problems with dsync and doveadm. I'm trying to move the maildir of a user who is no longer with the company to a manager's maildir.
For doveadm I am using the command:
doveadm move -u scavenaugh@lamontanita.coop jhenning@lamontanita.coop/INBOX/scavenaugh INBOX ALL
The error is:
doveadm(scavenaugh@lamontanita.coop): Error: user scavenaugh@lamontanita.coop: Auth USER lookup failed
/var/log/dovecot.log shows:
passdb doesn't support lookups, can't verify user's existence
The user is gone from passdb already, right? Re-create the entry with another password or password-locked.
Or, move the directories on filesystem level, e.g. something like:
cd user-Maildir-basedirectory rename 's/\A(\.[^.].*)/.usr_XYZ$1/' .[^.]* mkdir -p .usr_XYZ.INBOX/{new,cur,tmp} touch .usr_XYZ.INBOX/maildirfolder chown -R vmail:vmail .usr_XYZ.INBOX mv .usr_XYZ* manage-Maildir-basedirectory
.usr_XYZ is a prefix for a mail folder hierarchie identifying the user. vmail:vmail are the necessary Unix owner/group for the newly created directories with mkdir two lines above. The rename command renames all directory entries that start with a single dot to have the prefix, that should be directories only in a Maildir.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUg3HrF3r2wJMiz2NAQL1pQf9GeIEnLfG0zkFXPJ/J2CB/wmGP4m/MCMp BHxkRiLxXNezK4ckeliaLbpOD+NVyABc2n33tW11qav6IWrLTiGm9+A5p8TUOhfJ wMWBNJ0TEjtTM+0EbGJlOhkQ0QFooobfc5Sl30qR02yF+vk+SkBdRpkZK7ulpSPf 0ZtwIFF804NzMaKzZP2/SG77Z6JyW1N/TgaJ8QFtZwPrYymzD3iqtaFgoBAZqpSA g5koZIen0wjHy905Sy+uLseAFj6UIuhVdN8eG18NibaTHRBct3rTeyWAQY8GVZLq pPggEdUqHeTvrua5CzrL70iDbdcr29xezlvkxRueeDrGOApIprN4Mg== =1T6x -----END PGP SIGNATURE----- ---------------Output of GPG------------------ Decryption of block failed gpg: Signature made Fri 16 Aug 2013 08:33:16 AM CEST using RSA key ID 4C8B3D8D gpg: BAD signature from "Steffen Kaiser skdovecot@smail.inf.fh-brs.de"
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUhb1G13r2wJMiz2NAQKGOQf/Ycy/V+BOwg8Rk8geK+dALq+up321E6L1 bz7yhM/NnFklEoEH4vicGguFbpa+g42yo8FO6uAO22qTPD1Zf3VQFtMJs4zQPy52 zhl+F+7DGc0g27+tVcq/dqw7GRIT0nEXweo3FfYeTPHRozfTGqj73Ec8QvtGNkeU tt8T03om8ZDjHsvC1kH3Ta5eQyqrJxOYwkttOPVj8zsg3YfNim/Ejgb9cB4bZT+s 7cP5ySlHRKDQW/UkPcQaZKVZBxumPQNdV/HfY0LuANyTc0L7/8kQ4ly7TAKoFYhY mKPIdpPF4mCkRgx8v9PfpGZ7aZnI1DwED2nQYaheWcwH1Z6DukLn1A== =UtvU -----END PGP SIGNATURE-----
participants (2)
-
David Varela
-
Steffen Kaiser