Plesk is a friendly panel for inexperienced users, but when you want to customize something it gives many problems. One of them is often used older versions of software modified by them, which prevents customers to change things and thus charge them for customization, if they make it, or any type of poblem with software (vendor lock-in).
Changing the SMTP and IMAP user is extremely complex, because you have to modify the MTA software source and several important configuration files in the system. This has a number of disadvantages. The main one is that any microupdate of plesk will overwrite most customizations we make.
If you want to change the username of an account in Plesk 10.3 or 10.4 you can not :-(. At least, without removing the software Plesk. Plesj has an owner demon that authenticates the username from a sqlite3 database in a specific way and it is not allowed change the format type ‘email’ (email@example.com) as username. However, we can skip the demon to make an alias (with the name you want) of a real account. In this way you could authenticate yourself with that alias for both sending and receiving 🙂 If you’re going to put to the task we can give some clues to get to your goal, as there are several ways to do:
In Plesk, SMTP user account is the account itself, ie, the SMTP user of firstname.lastname@example.org is email@example.com. If we created in the control panel the account firstname.lastname@example.org and want to change the smtp user of this account must follow these steps:
Edit the file / usr/lib64/sasl2/smtpd.conf and comment the line:
Then start the service saslauthd running:
$ /etc/init.d/saslauthd start
In plesk it is off normally.
Then create a new hash table with the new user account email@example.com. We put it in the file / var/spool/postfix/plesk/hash_table. Inside we create mail account and your new user smtp:
Save and run the following command to create the hash table:
$ postmap /var/spool/postfix/plesk/hash_table
This creates the hash table /var/spool/postfix/plesk/hash_table.db
Then we indicate this hash table in the directive smtpd_sender_login_maps in the postfix configuration. To do this edit the file /etc/postfix/main.cf and modify the line
smtpd_sender_login_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
smtpd_sender_login_maps = $virtual_maps, hash:/var/spool/postfix/plesk/hash_table, hash:/var/spool/postfix/plesk/virtual
Finally restart postfix
$ /etc/init.d/postfix restart
It is important to configure saslauthd to start when booting the system
chkconfig saslauthd on
For the IMAP account, you can not change the mail accounts as such, you must create new accounts with the name you want and then link to the actual plesk account. We need to create system accounts such as:
We need the courier file that uses our version of plesk, since we must patch it, and perform a series of amendments to some configuration files. In plesk version 10.4 would be the courier-imap-3.0.8
The IMAP part of the left for another chapter;-)