Hello, I am using Virtualmin Pro and I am experiencing the following issue:
I created an email user, “example2@example.com”, and added it as a mail forwarding destination for another email user. However, when I delete the email user “example2,” the mail forwarding setting is successfully removed, but the email alias associated with it still remains in the /etc/aliases file. As a result, emails sent to the deleted email user’s address continue to bounce.
Additional information:
When the user is deleted and add them as a mail forwarding destination, the mail forwarding setting performs a user check and removes the user from both the forwarding setting and the /etc/aliases file. However, this check seems to be not performing after a user deletion and I have to manually remove it from “/etc/aliases”
Additionally to mention, that the email user “example2” in question belongs to an existing domain within the virtual server. Ideally, Virtualmin should perform the necessary checks and validations for such cases.
Is this a bug or unintended issue, a feature which must be reconfigured or a new feature added? Is there any way that could be automated?
@m.stoyanov I understand now what you mean. The topic’s title is a bit misleading.
@Jamie, I think we didn’t try to implement yet this kind of feature, i.e. to delete configured forward in a user when targeted user is deleted?
For example, if a user alice@example.com and john@example.com are created and then alice@example.com will forward mail to john@example.com but user john@example.com is later deleted, then the record that pointed to john@example.com in /etc/aliases would still be present in alice\@example.com: line.
I suppose we could do that in theory, but it seems risky because the admin might want to re-create the user immediately afterwards but now the forward would be gone.
there are a couple of problems automating the deletion of email forwarders
not all forwarders send email to domains controlled by the local virtualmin server, i.e. exgternal domains.
if you use testing the remote email account might be off temporarily for maintenance etc…
the handling of forwarders should be the responsibility of the account owner or admin
on a real edge scenario, this would break GDPR because it would be using information from one account without consent, to alter the behaviour of another account.
As we can easily check if forwarded address is setup for a local user, deleting it is more reasonable, rather than expecting that deleted user would be recreated.
As we can easily check if forwarded address is setup for a local user, deleting it is more reasonable, rather than expecting that deleted user would be recreated.
I suppose that would be a safe thing to do. Send me a PR!