Previous Page | Next Page

  1. Agustin's Linux Manual
  2. Networks & Servers
  3. About the Author
  4. Table of Contents
  5. IP Addresses Networks and Subnets
  6. Network Classes
  7. IP Address in Decimal Notation
  8. Sub-netting
  9. Designing Subnets
  10. Allocating Subnets
  11. Defining Host Addresses
  12. Variable Length Subnet Mask
  13. Routing Protocols
  14. Classless Internet Domain Routing
  15. Servers - Chapter 9
  16. Apache Web Server
  17. Configuring Apache
  18. Uploading Web Pages
  19. Apache Overview
  20. MIMEMagic
  21. DNS Servers
  22. Welcome to Webmin
  23. Creating the Master Domain
  24. Adding the Reverse Zone
  25. Querying the DNS server
  26. Adding Virtual Domain to DNS Server
  27. Reverse Zone for Virtual Zone
  28. Binding IP Address for Virtual Domain
  29. Virtual Web Hosting
  30. DNS Security Options
  31. FTP Server
  32. Securing the FTP Server
  33. Email Server
  34. Postfix Configuration
  35. Dealing with Identical Users
  36. Configuring Email Clients
  37. Configuring Outlook
  38. Samba Server
  39. Configuring SAMBA Server
  40. The smb.conf File
  41. smb.conf Analysis
  42. Adding Users to Samba

Postfix Configuration

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

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:

 mydestination =  $myhostname, localhost.$mydomain, 

Edit this line to point to the destination file:

mydestination =$myhostname,localhost.$mydomain, /etc/postfix/mydestination 

Next edit the mydestination file and enter your domain-name(s):

[root@server2 postfix]# vi mydestination

Create the Aliases

In the ALIAS DATABASE SECTION, uncomment the line:

Alias_maps = hash:/etc/postfix/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 All users in the system can send and receive email under by default. If you already updated mydestination file and included other domains; that is not enough for virtual mail servers.

Since 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 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.

To implement this, locate and insert:

# Insert text from if you #need virtual domain support.

virtual_maps = hash:/etc/postfix/virtual_maps

Note that virtual_maps is hashed just like aliases, the next step is to create a file in /etc/postfix. Call it virtual_maps and include the virtual domains in it.

[root@server2 postfix]# vi virtual_maps DOMAIN velasco

In this file you will place all your users for the virtual domains, and after editing this file you have to create the database virtual_maps.db

At your command line (console) type the following:

[root@server2 postfix]# postmap virtual_maps < virtual_maps

Restart postfix and you are ready to go. Test the system with your user under the virtual domain, you should be able to receive and send email.