Ubuntu 22.04
Sponsored Link

Mail Server : Virtual Domain Setting2022/05/17

Configure for Virtual Domain to send an email with another domain name different from original domain.
This example is for the case you use OS user accounts.
For example,
present domain name ⇒ srv.world
new domain name ⇒ virtual.host
a User [ubuntu] has an email address [ubuntu@srv.world],
a User [jammy] has an email address [ubuntu@virtual.host],
the user [jammy] uses the same name for before [@] with [ubuntu].
[1] Configure Virtual Domain.
vi /etc/postfix/main.cf
# add to the end of the file

virtual_alias_domains = virtual.host
virtual_alias_maps = hash:/etc/postfix/virtual
vi /etc/postfix/virtual
# add

ubuntu@mail.virtual.host   jammy
postmap /etc/postfix/virtual

systemctl reload postfix

[2] Set new account on Email client and verify possible to send emails normally.
Matched Content