Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'permitted': 0.07; 'strict': 0.07; 'tries': 0.07; '22,': 0.09; 'omit': 0.09; 'rejected': 0.09; 'sake': 0.09; 'subject:script': 0.09; '"is': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'gilles': 0.16; 'subject:mails': 0.16; 'wrote:': 0.18; 'cheap': 0.19; 'server,': 0.19; 'not,': 0.20; '(the': 0.22; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'record': 0.27; 'rest': 0.29; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'anyone': 0.31; 'run': 0.32; 'checking': 0.33; 'computer.': 0.33; 'received:google.com': 0.35; 'subject:Simple': 0.36; "didn't": 0.36; 'thanks': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'so,': 0.37; 'server': 0.38; 'mine': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'guy': 0.60; 'simple': 0.61; "you'll": 0.62; 'spam.': 0.64; 'great': 0.65; 'mail.': 0.69; 'records,': 0.69; 'jul': 0.74; 'detecting': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3kI+ja9KxUJWCGUcGpyu8a86GS1BxgwbgWnhV1FRR/8=; b=rJnwKV41xY9j9SguRydSXowKqPr9cRZK1mkeG0y7483lF+bkEbQvVRlfJ88/MUxxN8 qpCewltZLOsDpnIA1YvL4VWTDVB9gTgbf5UVsM6OQSweANIU3I/klOHeYRu2pNJhV49d hPvF+L0WTynW5AU1BnyiBeFozPEeuuZi7bd14eDRdLsJ+QAgHF49vbYa4UyOhkwJJWIr 0fvHhuPtos9Gpo9zbdviw2epP7/56j6BQL+rkz1USHmOMaDrx+NPcYS36kKJ5wsjcc+s 2K5Z8WxW2DQldeDT6PUskXPTAEb9khcukZ/DDWvLrIv1MkidXW5zGkgnYOjcIlciGhAM zKbQ== MIME-Version: 1.0 X-Received: by 10.221.4.4 with SMTP id oa4mr9215666vcb.70.1374497473008; Mon, 22 Jul 2013 05:51:13 -0700 (PDT) In-Reply-To: References: <368qu85msgfhuk2j2s13qj0bqn4rkcint9@4ax.com> Date: Mon, 22 Jul 2013 22:51:12 +1000 Subject: Re: Simple Python script as SMTP server for outgoing e-mails? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374497482 news.xs4all.nl 15916 [2001:888:2000:d::a6]:36139 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51037 On Mon, Jul 22, 2013 at 10:38 PM, Gilles wrote: > On Mon, 22 Jul 2013 22:29:42 +1000, Chris Angelico > 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@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