How to add a new email to postfix without creating a new user account?
ubuntu
email
postfix
Software and digital electronics / IT
2024-10-31 09:33
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?
add comment
Answered by robin
2024-11-03 00:15
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
add comment