Thursday, April 17, 2008

[Configuring Postfix as an Inbound Mail Gateway by Tyrone Cusi]

Here are the details, you can use this example:

In this scenario your Postfix server (gw.example.com) is relaying mails for hr.example.com and sales.example.com. Each domain has its own internal mail server.

1. Make sure that the DNS has been configured correctly with MX records for hr.example.com and sales.example.com pointing to the gateway gw.example.com.

2. In your main.cf file, set relay_domains to include the two internal domains:

relay_domains = hr.example.com, sales.example.com

3. Make sure that the transport_maps parameter points to your transport lookup table:

transport_maps = hash:/etc/postfix/transport

4. Add entries to your transport file for each domain pointing to the correct internal mail systems:

#
# transport maps
#
hr.example.com relay:[mail1.example.com]
sales.example.com relay:[mail2.example.com]

We've used brackets around the internal mail system host names to disable MX lookups for those systems.

5. Reload Postfix so that it recognizes the changes in its configuration files:

# postfix reload


TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.

No comments: