Showing posts with label remote mx. Show all posts
Showing posts with label remote mx. Show all posts

Monday, December 27, 2010

External MX record / Mail server

It is possible to set external mail on server by setting MX record of the server dns to point to external IP. Another method will be removing the dns of the domain from the server and let the DNS be resolved on the external managed DNS.

If you have Postfix configured for your smtp, you will need to set the virtual-transport of the domain to another place.
Example:
domainname: exmaple.com, transport: smtp:ASPMX.L.GOOGLE.com:25

If you are running virtual domain support with mysql for postfix, you may find the configuration in /etc/postfix/mysql-virtual_transports.cf , stating the table in mysql to change.

More info:

Friday, September 18, 2009

sendmail redirecting mail to outside

There are times when you host your mail on another server like google mail ..
To do so, you may set it in the configuration to set sendmail to redirect mails to outside instead of identifying it as local recipient.

in /etc/mail/sendmail.mc
MASQUERADE_AS(`domain.com')dnl
define(`LUSER_RELAY', `domain.com.')dnl

Note: do not miss the 'dot' behind the domain.

then compile with m4 in /etc/mail
m4 sendmail.mc > sendmail.cf

restart sendmail service:
/etc/init.d/sendmail restart

testing it:
sendmail -v yourname@domain.com < /dev/null

check your email, and makesure to check your spam folder as this is going to be an empty email, and spam filtering doesn't like that ;)