Multiple email domains in a single account

So after you have applied the patch, you can have 2 v- scripts
v-add-email-domain-alias
With something like:

#!/bin/bash
domain=“$1”
alias=“$2”
file= “/etc/exim4/domain_aliases”
cat $file | grep "$alias: $domain > null
if [ $? -eq 0]; then
echo “Alias already exists”
exit 1
else
echo “$alias: $domain” >> $file
service exim4 reload
fi

v-delete-email-alias

#!/bin/bash
domain=“$1”
alias=“$2”
file= “/etc/exim4/domain_aliases”
cat $file | grep “$alias: $domain” > null
if [ $? -eq 0]; then
sed -i …
exit 0
else
echo “alias doesn’t exist”
exit 1
fi

You need to check for existing mail-user accounts and what they’re doing, or else you’ll have a huge mess…
Let’s say you already have userx on domain2, and your new userx has the same name on domain1, and then you alias the domain2 to domain1, what do you do?

Or, let’s assume you had already created a forward earlier, for userx@domain2 to userx@domain1, so the mail-account userx already exists for domain2, what do you do with that?

I think you only need to check if the intended aliasdomain is not already defined as a local domain.

Would love to, but I don’t have the knowledge of how to do so. Besides that, we would also need a modification to the gui to allow to edit the aliases.

If someone else has the knowledge to do so: you are welcome to use this as a startingpoint for making email domainaliases possible in hestia.

This means you would restrict web usage of that domain too? This is not desirable, if you ask me. Users will already have websites under those domains, later on decide to make them a mail alias domain.

No, I believe web and mail are separately handled by hestia.

Yes the current web handling is fine