1. Allow relay from your VPC in /etc/mail/access
--access--
[root@host /]# cd /etc/mail
[root@host /]# cp access access.org
[root@host /]# cp access.db access.db.org
[root@host /]# vi access
===
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:10.0 RELAY <-- Add
===
[root@host /]# makemap -v hash access.db < access
--submit.mc--
[root@host /]# cp submit.mc submit.mc.org
[root@host /]# cp submit.cf submit.cf.org
[root@host /]# vi submit.mc
===
define(`confDOMAIN_NAME', `yourdomain.com')dnl <-- Add
FEATURE(`msp', `[10.0.1.25]')dnl <-- Change to your relay server.
===
[root@host /]# m4 submit.mc > submit.cf
--sendmail.mc--
[root@host /]# cp sendmail.mc sendmail.mc.org
[root@host /]# cp sendmail.cf sendmail.cf.org
[root@host /]# vi sendmail.mc
===
define(`SMART_HOST', `[10.0.1.25]')dnl <-- Add
define(`MAIL_HUB', `yourdomain.com.')dnl <-- Add
define(`LOCAL_RELAY', `yourdomain.com.')dnl <-- Add
===
[root@host /]# make sendmail.cf
[root@host /]# service sendmail restart
That's it!
Then test it from your web server.
No comments:
Post a Comment