Change users username but keep mailbox

ericosman

Verified User
Joined
Nov 25, 2019
Messages
675
Location
Weert
Hi,

I named one of my users by it's first name (not seeing the problem).... DA automatically create's a mailbox for every domain they own with there username in front..
Now is my question, can i rename my clients username without losing the mailbox (and all of it's 4GB of mail)?

What i would like to do is:
Change the username and keep the mailbox, this because they want to connect it with an other service and they have to login with there full e-mail address instead of just the username.
 
they have to login with there full e-mail address instead of just the username.
So they are using the system account at this moment. You can change the username, but for the system user it will change the mailbox too. Not sure if this will be kept.
If yes, you have to create the wanted mailbox seperately and then move all mail to it again.

I think there is a much more easier (and safer) solution, so they can login with [email protected] instead of with just "user" as system mail account.
So they can use the full e-mail address to login instead of just the username.

You have to add this line in directadmin.conf and restart DA:
system_user_to_virtual_passwd=1

It can take a minute or two before it functions, otherwise run either of these commands:
echo "action=rewrite&value=email_passwd" >> /usr/local/directadmin/data/task.queue
or:
echo "action=rewrite&value=email_passwd&user=fred" >> /usr/local/directadmin/data/task.queue

Explanation can be found here:

This way, nothting fysically changes and mail is kept.
 
Hey Richard,

Thanks! but after changing this:
system_user_to_virtual_passwd=1

Will the user still be able to login with just the username?
 
Back
Top