HI GUYS,
I found the answer in this site: SOURCE:
http://serverfault.com/questions/653.../128450#128450
*******************************************
What I did to disable local delivery. I'll be using the example.com domain.
Requirements:
example.com A entry pointing to IP address assigned to one of the eth interfaces.
/etc/hosts defining example.com assigned to the very same IP address as above
example.com MX records pointing to Google servers (ASPMX.L.GOOGLE.COM, etc)
default sendmail installation (mine was on Ubuntu)
Steps:
vim /etc/mail/sendmail.mc
at the end:
define(`MAIL_HUB', `example.com.')dnl
define(`LOCAL_RELAY', `example.com.')dnl
and then:
sendmailconfig (or /etc/mail/make depending on your distro)
service sendmail restart
testing:
echo -e "To:
user@example.com\nSubject: Test\nTest\n" | sendmail -bm -t -v
echo -e "To: user\nSubject: Test\nTest\n" | sendmail -bm -t -v
You should see it connecting to the google server and then you should see your mail being delivered to your Google inbox.