Simple Python script as SMTP server for outgoing e-mails?

Chris Angelico rosuav at gmail.com
Mon Jul 22 14:51:12 CEST 2013


On Mon, Jul 22, 2013 at 10:38 PM, Gilles <nospam at nospam.com> wrote:
> On Mon, 22 Jul 2013 22:29:42 +1000, Chris Angelico <rosuav at gmail.com>
> wrote:
>>One thing to check when you change how you send mail is your SPF
>>record. I run the mail server for kepl.com.au and have set its SPF to:
>>
>>"v=spf1 ip4:122.107.147.136 ip4:203.214.67.43 ip4:192.168.0.0/16 -all"
>>
>>If your SPF is as strict as mine (and if it's not, please make it so,
>>for the sake of the rest of the world!), you'll want to check it
>>before you start sending mail directly from your own computer.
>>Otherwise your mail _will_ be rejected as spam.
>
> Thanks for the tip. I didn't know about SPF
> http://en.wikipedia.org/wiki/Sender_Policy_Framework

It's a great way of detecting legit vs forged mail. If anyone tries to
send mail purporting to be from anything at kepl.com.au and the receiving
mail server is checking SPF records, it'll be rejected after one cheap
DNS lookup. It's a simple and cacheable way to ask the owning server,
"Is this guy allowed to send mail for you?". (The 192.168 block in my
SPF record above is permitted to allow some intranet conveniences;
omit it unless you need it.)

ChrisA



More information about the Python-list mailing list