9.2 The Home Network Configuration

In this configuration we are concerned with configuring a host which is both on a local area network and is also a dial-up host. In many cases this type of environment is likely to feature multiple mail users sending mail from a variety of clients. Everything we just did in the stand alone config applies here but we do need to add the mynetwork stuff for the LAN. In the stand alone configuration we said:

mynetworks = 127.0.0.0/8

Modify this to be:

mynetworks = 192.168.1.0/24, 127.0.0.0/8

or whatever you've used for addresses on your network.

In addition to this you may have to extend the concepts offered in the discussion about the sender_canonical functionality to apply to multiple users.

The environment we're discussing here may, or may not use DNS. Since MTAs like to use DNS by default you may want to consider implementing a local DNS for your network. If you elect not to please remember the requisite discussion about this in the previous section. Actually implementing DNS is not within the scope of this document. If you need assistance with that there is copious documentation available on the net and you probably have the DNS HOWTO installed on your machine.

You may be wondering at this point how you send mail to local accounts in this environment. The best way is to use the bracket method which forces Postfix to ignore DNS and route mail directly to the given destination IP address. This works quite well in all sorts of mixed host environments. Say, for example, that you have the following mixture of host machines and users:

These would be the appropriate local addresses for each person:

One other tweak which could be applied is to use the alias file to map incoming mail directly to it's destination. Using the same sample environment we were just using here's what that would look like:

In this way any incoming mail for bob.smith or tommy.smith is automatically routed to the final destination. If their machines happen to be off at the time the mail arrives it is queued until their machine comes back up. The other users are not mapped because their mail stays on the mailhost or is read with client software.