Postfix Configuration

The following explanation is a step-by-step instruction on the sections that you need to modify in main.cf

Postfix offers a nice feature called SOFT BOUNCE, this feature can be used when you are working on an already setup mail server. When this feature is active the server will still queue messages during testing time.

Domain for Outbound mail

Sending Mail

Because we are using a domain name, uncomment the following line, and read ahead to create an alias database.

myorigin = $mydomain

Domain for Inbound

Receive mail

Do not enable any interface, instead create a file called destination in /etc/postfix/destination and place the domain-name for the destination in that file. In the RECEIVING MAIL section, find the line:

Create the Aliases

Next execute the following command to create the database. Note that the database will be created in the directory /etc/postfix/

[root@server2 postfix]# postalias /etc/postfix/aliases

That's it. Restart postfix. You now should be able to send and receive email from your domain name.

Virtual Domains with Postfix

We have successfully configured the email server to send and receive email at the default domain (Primary domain), in this case netcontrol.org. All users in the system can send and receive email under netcontrol.org by default. If you already updated mydestination file and included other domains; that is not enough for virtual mail servers.

Since onetraining.net is a virtual domain in this example, I will use it to set the mail server in the virtual domains.

Configuring the virtual domain email server

Virtual Address Mapping

We need to go back and edit the main.cf file to set this virtual address. All users in each domain have to be able to receive and send email. And of course it has to get to its right destination.