Sponsored Link

Mail Server : Set Virtual Domain2021/07/30

Configure for Virtulal Domain to send an email with another domain name different from original domain.
This example is for the case you use OS user accounts.
If you use virtual mailbox accounts, refer to here.
For example, present domain name ⇒
new domain name ⇒
a User [rocky] has an email address [],
a User [redhat] has an email address [],
the user [redhat] uses the same name for before [@] with [rocky].
[1] Configure Postfix.
[root@mail ~]#
vi /etc/postfix/
# add to the end of the file

virtual_alias_domains =
virtual_alias_maps = hash:/etc/postfix/virtual
[root@mail ~]#
vi /etc/postfix/virtual
# add to the head of the file redhat
[root@mail ~]#
postmap /etc/postfix/virtual

[root@mail ~]#
systemctl reload postfix

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