Moving a local domain to sql
I have a domain that current maps to local users that I want to move into the mysql maps with all the other domains, but I am unsure of the best way to proceed with this.
For example, my mail server is covisp.net and my personal domain is kreme.com, and currently kremels@kreme.com maps to the local user kremels. I want it to map to the existing mysql database as “kernels@kreme.com”. (For example only, I’m not moving kreme.com, I am too dependent on procmail for all my list processing).
Once I setup the user account in the mysql database do I just move the Maildir from /home/kremels to /usr/local/virtual/kremels@kreme.com/ and reload dovecot?
-- I leave symbols to the symbol-minded - George Carlin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 21 Apr 2015, @lbutlr wrote:
I have a domain that current maps to local users that I want to move into the mysql maps with all the other domains, but I am unsure of the best way to proceed with this.
For example, my mail server is covisp.net and my personal domain is kreme.com, and currently kremels@kreme.com maps to the local user kremels. I want it to map to the existing mysql database as “kernels@kreme.com”. (For example only, I’m not moving kreme.com, I am too dependent on procmail for all my list processing).
Once I setup the user account in the mysql database do I just move the Maildir from /home/kremels to /usr/local/virtual/kremels@kreme.com/ and reload dovecot?
an userdb may overwrite anything, so you could configure your SQL userdb to return exactly the same results you got for your local user. It also is a question, which username kremels is going to use to login and how the LMTP/LDA (if you use it) work. If you use procmail, you probably need to configure procmail as well. Access permissions might kick in, e.g. moving from system users to virtual users.
In fact, you offered to few information to answer the question.
I moved my system users to LDAP with Dovecot v1, when moving to Dovecot v2 I moved them to virtual users and one or three system users. Noone noticed the change.
You need not reload Dovecot, but run
doveadm auth cache flush
to remove cached userdb information. Also, while you migrate an user, kick the user from Dovecot and make sure the user stays offline while the during process, e.g. using a special userdb { deny = yes } .
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVTc2eHz1H7kL/d9rAQKV5Af/Qe1R6kqN+CJrkl/9PILIi6f1/n1jJUYH 4Ms0OZHSVxFdk2ePG7lf/m5Fl/bpe5joroUFjeTxIWQjuUpDJa4fXW45UkfQ84yo AEK3UBxNOBCNWkjSgF6GivQUMGmj6EUIRJBC0s9jOAy0ZyZ0wYdA8vEPzs6P8aBz 5j7Vwm+81i9uWOdEtxojhbEo6ZtWpyFlYFz/UvnAzb5CWckLEXe9c62s52/IvUmG LbQJLAWVEzzUXSXhXl3+V59aHokdCC0/XdIvYoZUGRXZTCcoXzKDKqOovq4EPte/ KXl1h9ephGn0hI7MtxHbYZ/Hx7Bv3hwF013qK5arCI0hXA9bAnuwWQ== =3tL0 -----END PGP SIGNATURE-----
On 2015-04-21 22:49, Steffen Kaiser wrote:
On Tue, 21 Apr 2015, @lbutlr wrote:
I have a domain that current maps to local users that I want to move into the mysql maps with all the other domains, but I am unsure of the best way to proceed with this. an userdb may overwrite anything, so you could configure your SQL userdb to return exactly the same results you got for your local user.
Ah, that's an idea, but I think in this case moving the domain into the sql DB is the way to go.
It also is a question, which username kremels is going to use to login
the mysql users use user@domain.tld to login. The users for the domain will have to update their login information.
and how the LMTP/LDA (if you use it) work. If you use procmail, you probably need to configure procmail as well.
Procmail and dovecot have not gotten along very well for me, so I am not moving the accounts that need procmail. I can get it to work, but it is far more fragile than just regular procmail with local user LDA.
I moved my system users to LDAP with Dovecot v1, when moving to Dovecot v2 I moved them to virtual users and one or three system users. Noone noticed the change.
These are not system users (that is, system users are @covisp.net) but they map to system users. for example, one of the accounts is info@example.com but maps to the local user user-example.
Thanks for the reply, I think this is doable.
participants (3)
-
@lbutlr
-
kremels
-
Steffen Kaiser