I'm trying to setup Django on an AWS instance to send emails through my main website's server (non-AWS) rather than needing to use external mail services such as Mandrill, Amazon SES... etc
I first setup my main server's DNS records to point a sub-domain to the aws instance's elastic IP, for example:
mail1.website.com
--> 1.1.1.1
I filed a request to have a reverse DNS record setup pointing my AWS instance's elastic IP to a sub-domain, they set it up for example:
1.1.1.1
--> mail1.website.com
Now that the reverse dns record is setup mail1.website.com
should be able to be used in django to send emails without them being marked as spam.
https://docs.djangoproject.com/es/1.9/topics/email/#smtp-backend
Would using the following be enough?
EMAIL_HOST = 'mail1.website.com'
DEFAULT_FROM_EMAIL = 'test.website.com'
If I need to provide email user/password/port is it possible to set it up to login with a specific email like [email protected]
but then email from [email protected]
or do I have to setup the smtp settings to the root email address
No_reply email:
EMAIL_HOST = 'mail1.website.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'mypasshere'
EMAIL_PORT = 465
DEFAULT_FROM_EMAIL = 'test.website.com'
or root:
EMAIL_HOST = 'mail1.website.com'
EMAIL_HOST_USER = 'root'
EMAIL_HOST_PASSWORD = 'mypasshere'
EMAIL_PORT = 465
DEFAULT_FROM_EMAIL = '[email protected]'
SPF_SOFTFAIL
,RDNS_DYNAMIC
andHELO_DYNAMIC_IPADDR
. I've already got a reverse dns setup as explained aws.amazon.com/blogs/aws/… by using aws.amazon.com/forms/ec2-email-limit-rdns-request – Kelwin