I need to have multiple email accounts at my domains without adding a new ubuntu account. How can I add such an email in postfix?
you can do it via virtual accounts.
first of all make sure that /etc/postfix/virtual
is mapping your virtual accounts via:
cat /etc/postfix/main.cf | grep /etc/postfix/virtual
It should give you a response like this
virtual_alias_maps = hash:/etc/postfix/virtual
Then, edit this file
sudo nano /etc/postfix/virtual
And add your email followed by space and the name of user to receive it. such as
email1@example.com user1 email2@example.com user1 info@example.com root support@example.com root contactus@example.com root
Then, add it to the postfix:
sudo postmap /etc/postfix/virtual
And do not forget to reload the postfix
sudo systemctl reload postfix