Linux Harbour

Technology News of Linux & Open Source


Postfix SMTP – How to setup an email relay system ?

Email relay is an email server which forwards incoming SMTP emails to an another SMTP server. Postfix can be setuped as an email relay.

First, you should ensure which domaisn are being forwarded (eg. and, and hostname of destination SMTP server which you expects emails for these domains forwarding to. (eg. destination_host of these domains).

Edit /etc/postfix/

transport_maps = hash:/etc/postfix/transport
relay_domains =,

Edit /etc/postfix/transport:

Regenerate the hash table and reload the Postfix daemon.

$ postmap /etc/postfix/transport 
$ /etc/init.d/postfix reload

Sammy Fung

Sammy is the founder of the Linux Harbour.