Alias Settings Not Updated on Rename

When renaming an alias with Virtualmin, the mapping in /etc/postfix/virtual is only partly updated. The destination mapping defined in /etc/aliases is left untouched (with the old alias name), along with all autoreply files. This leads to an error in the following situation:

1) Create an alias for johndoe@domain.com with an autoreply.

Result: This creates a mapping in /etc/postfix/virtual for johndoe@domain.com to johndoe-domain.com, which is then defined in /etc/aliases.

2) Rename the alias to jdoe@domain.com.

Result: This updates the mapping in /etc/postfix/virtual to jdoe@domain.com, but the destination is still "johndoe"-domain.com.

3) Attempt to create a new alias for johndoe@domain.com pointing to jdoe@domain.com.

Result: Failed to save alias : A mailbox or mail alias with the same name and domain already exists

The alias doesn't actually exist, but Virtualmin apparently thinks it does, because it did not completely rename the original alias.

These files need to be renamed also:
/home/domain.com/autoreply-johndoe@domain.com.txt
/home/virtualmin-autoreply/xxxxxxxxxx-autoreply-johndoe@domain.com.txt

BTW, what is the purpose of having these files in both places?

Status: 
Closed (fixed)