3 ms·
Amazon probably provides PTR records for all of their IPs. You can check with the host command on Linux: host 10.1.1.1 You'll also want an SPF record for you
by SwellJoe 19y ago
Amazon probably provides PTR records for all of their IPs. You can check with the host command on Linux:
host 10.1.1.1
You'll also want an SPF record for your zone:
http://www.openspf.org/ http://www.openspf.org/
DomainKeys are being checked by some webmail providers, but it's only a non-spammy characteristic at this point, not mandatory for delivery. As long as nothing else about your message is stupid (e.g. RFC compliant SMTP server, reasonable DNS records, and you aren't sending 100 per minute to addresses in the same domain), it'll go through.
I'd suggest using whatever Python library will allow you to send using a real SMTP server (or just pipe your email into the mail or sendmail command, which use the local smtpd to send, by default), like Postfix or Sendmail. There may be a standalone library that is actually RFC compliant and handles error conditions properly, but it seems unlikely from a historical standpoint (most such libraries, particularly in the PHP world, are renowned for epic failure). As long as Postfix or Sendmail are configured properly, your mail will be RFC-compliant and will look far less spammy than those coming from a half-assed implementation of the spec.
- kirubakaran 19y agoGreat! Thanks. Can you please point me to some how-to about acting on incoming email using Python? I look far and wide but couldn't find much.
- SwellJoe 19y agoI have no idea. I haven't worked with Python in several years. But, I know that both Mailman and Trac are written in Python and they both do stuff with incoming mail...so, there's certainly some python code out their for dealing with incoming mail. That's where I'd start my search if I were in your shoes.
- kirubakaran 19y agoThanks.
- alphamule 19y agoone way to do it is to use procmail to filter incoming mail and piping the ones you are interested into your python program which will take the rfc822 message on stdin. the email module (http://docs.python.org/lib/module-email.html http://docs.python.org/lib/module-email.html) will let you parse these messages. this is provided that your MX dns entry points to your machine and that you have the appropriate ports unlocked, of course.