# Routing internal mail to a single mailserver



## balanga (Aug 4, 2019)

How would I go about routing internal mail within my LAN to a single server?

Should I setup postmaster@centralmailserver as the principle recipient of all mail to root on each system on the LAN and direct all that mail to the LAN postmaster?


----------



## SirDice (Aug 5, 2019)

balanga said:


> How would I go about routing internal mail within my LAN to a single server?


It's called a "smarthost". And is easily configured. What MTA are you using?


----------



## balanga (Aug 5, 2019)

sendmail

I was thinking of using my FreeNAS box as the mail hub for the lan.


----------



## VladiBG (Aug 5, 2019)

If you just want to forward the system mails that are addressed to your root account use /etc/aliases edit this line:
root: email@example.com

after that you need to rebuild the data base for the aliases using `newaliases` command.

newaliases(1)
aliases(5)


----------

