In most medium to large businesses there are times, when you need to send mail to a mail relay service. This is used due to restrictions in access to external networks. Instead of having to open ports for every server in a network to allow sending of mail. You setup a mail relay server to allow mail to be routed through.
Here is how you setup a server to send mail to mail relay service instead of through the default gateway.
- Install postfix package.
- Edit /etc/postfix/main.cf
yum install postfix
See below for what the lines look like