Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61856

Re: Using pythons smtp server

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Using pythons smtp server
Date 2013-12-13 18:12 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <l8filn$9el$1@reader1.panix.com> (permalink)
References <CALyJZZXNDuBBgG0Mw_BvajzbfLk4QbADAjG+z_xAVG9Q75sUYQ@mail.gmail.com> <kegma9pder3vv43f7jhsut4ghvqdg6527h@4ax.com> <mailman.4088.1386957805.18130.python-list@python.org>

Show all headers | View raw


On 2013-12-13, Vincent Davis <vincent@vincentdavis.net> wrote:

> Obviously I don't really know how this works. I have used python to
> send email using "my" smtp server (whatever that may be gmail,
> postfix..) But I don't want to do that. After a little more research
> I think what I need to do is lookup the MX address of the address I
> want to send the email too.
>
> Then submit the email to that address using smtplib.SMTP

Maybe.  In theory, that will work -- and it did in the good old days
before SPAM (the electric kind) was invented.

But, many SMTP servers (the ones pointed to by the MX record) will not
accept mail from you unless you meet various requirements (which vary
considerably and the SMTP servers administrators try to keep secret).

For example you may have to be sending from an IP address who's
reverse-DNS lookup matches up with the from headers and with the MX
record for the domain you claim to be sending from.

Your mail might also get blocked/discarded if you're sending from
what's been identified as a dynamically allocated IP block (even if it
does have proper DNS and MX records).

-- 
Grant Edwards               grant.b.edwards        Yow! Look into my eyes and
                                  at               try to forget that you have
                              gmail.com            a Macy's charge card!

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Using pythons smtp server Vincent Davis <vincent@vincentdavis.net> - 2013-12-13 10:44 -0700
  Re: Using pythons smtp server Grant Edwards <invalid@invalid.invalid> - 2013-12-13 18:12 +0000

csiph-web