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

Chris Angelico rosuav at gmail.com
Mon Jul 22 12:32:54 EDT 2013


On Tue, Jul 23, 2013 at 2:25 AM, Michael Torrie <torriem at gmail.com> wrote:
> On 07/22/2013 08:15 AM, Chris Angelico wrote:
>> If legit mail is rejected for failing an SPF check, it's the sending
>> admin's problem, not yours. You should never have problems with it if
>> it's set up correctly. And since rejected mail gets reported to the
>> transmitting MTA, you don't need to drop it in a spambox or anything.
>> It's not spam, it's simply invalid mail (equivalent to something sent
>> to a dud address).
>
> Sure. Tell that to the people you work for who depend on e-mail.  When I
> was a sysadmin (quite recently), I'd have gotten fired for enforcing
> such an arbitrary policy.  Indeed when mail wasn't coming through that
> someone in the organization was expecting and wanting, regardless of
> SPF, it was indeed *my* problem and my job was on the line.  BOFH
> attitudes simply aren't going to change that reality.

Is your job on the line if the sender of that email got the
recipient's address right? Is your job on the line if the sender
mucked up his SMTP settings and the message didn't even get to your
server? Is your job on the line if the email never even got sent? Then
why should your job be on the line if the sender violates his own
declared protocol? Remember, if you don't publish an SPF record, your
emails will be accepted regardless. It's only if you explicitly create
that DNS record that ends with "-all" that any of this will happen -
which means you *asked* for that mail to be rejected. If you do that
and then send mail from a different IP, then I *will* reject it.
Accepting mail and just giving it a spam score is *worse*, because the
sender won't even know why it didn't get through (what if most of his
mail gets accepted, but that one email when he sent a blank body,
subject "RE: your invoice", and a zip file attachment, managed to trip
the spam cutoff and get dumped?), whereas rejecting will result in a
quick and easy bounce, probably within seconds (minutes maybe).

I stand by SPF checking. It has never been a problem. If you don't
stand by protocols, you weaken those protocols.

And speaking of protocols, I'm now going to have to follow the "I'm on
an airliner and mobile phones have to be turned off" protocol, as the
flight's due to depart shortly. Ah, protocols... some you love, some
not so much.

ChrisA



More information about the Python-list mailing list