If you have many, many application servers, then sometimes you may wish to have all outbound email handled by one or more outbound relay mail hosts. This can be somewhat easier to manage over time.
Joyent Accelerators make good SMTP relay hosts with the proper setup and come pre-installed with Postfix.
Open port 25 on the server Create A record for the server
Create PTR record for the server
Create MX record for the server
v=spf1 include:domainname.com a:mta.domainname.com ~all
Changes to /etc/postfix/main.cf
myhostname = mta.domainname.com mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 127.0.0.1/32, 127.0.0.0/8, (IP addresses of host that will send relay mail to this server) smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination smtp_connection_cache_on_demand = yes smtp_connection_cache_destinations = yahoo.com,yahoo.com.cn, yahoo.com.br, yahoo.co.in, yahoo.es, yahoo.com.ar, yahoo.co.kr, yahoo.co.id smtp_connection_cache_time_limit = 10 smtp_connection_cache_reuse_limit = 50 minimal_backoff_time = 150 maximal_backoff_time = 150 queue_run_delay= 150
Make sure your server host name and domain are set to same as in the DNS /etc/hosts:
ipaddress mta.domainname.com mta /etc/sysconfig/network: HOSTNAME=mta.domainname.com DOMAINNAME=domainname.com
Restart the MTA server
Changes to /etc/postfix/main.cf relayhost = ipaddress (the ip of the MTA goes here)
Reload postfix
Core Documentation contributed by Pavel Pragin of SolutionSet.