🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #261432

Re: Question about smtp method in python

#261432
From: Zax
Date: Sun, 24 Feb 2013 14:40
65 lines
3437 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, 24 Feb 2013 13:30:30 -0000, admin2@suremail.info wrote in
Message-Id: <9fe87ca07094d0ad6891c4e50ac43525@anonrem>:

> Here is the code I am using to send messages using smtp:
>
> 	server = smtplib.SMTP('not my isp mailserver')
> 	server.login = ('userid','password')
> 	server.set_debuglevel(0)
> 	server.sendmail(fromaddr,mailadd,msg)
> 	server.close()
>
> What seems to be happening is that the server.login
> credentials are ignored.

If they are ignored, they have been accepted otherwise an exception
would be raised: Your code doesn't check if the server supports AUTH.

For example:-
smtp = smtplib.SMTP()
smtp.connect()
smtp.ehlo("localhost.invalid")
if smtp.has_extn("AUTH"):
    smtp.login("UID", "PWD")
smtp.sendmail(from, to, msg)
smtp.quit()

> If I am using my isp's mail server it works, presumably
> because my isp knows that my IP belongs to them. And it
> works even if I put in an invalid userid and password.
Your ISP's mailserver knows you can relay through them because your IP
is in a range they recognize as their network.

> For any other mail server, I get a 'relay not allowed'
> message which is consistent with not being authenticated
> with the server.
Are you sure you're actually allowed to relay through the server you're
attempting to use?

If you set_debuglevel(1) it will provide you more feedback.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iQIcBAEBCAAGBQJRKiZ5AAoJEIBmv8lxNqHoGXYQALaKk125wPvIGm9q8lrA1yGw
OaOaiU+fP3vZMyqDcfs6EHZM8cal2zjbwQt1ayxf3E7OIO3/SPlld1avDwpLqbpT
ONjFG9YE07Zq2ExGJEdKnIVOzI3xx76pEuA2z3LinPMvl6KEam7T1yKDTqOxfC7k
E4Tee4ZtWu21Pu0/le6RTue0GKV7iCbLcxIQTSrKunNhbj2ix3Rx48QWEYmgJ/cf
u4hKhomLmf/mWT8NiRbPY6JJrbnuuasG5tbRu1Z//R7pNt+ILM94Jx5q7mb/qQgY
2yQd+S5JSibGx6f5yL95GyGD5ZFHyjxBQDHJIy06xeuiyVE8KG2lUHDfVplbj9iS
XavlttIT9YnGL7WrPHHyF0UpEP6g9YiSe1HVNqmJkA6gxv0s6j/Tc1IoZqb/P3f9
8QoSjA5QqNpv6iqlellRKm2eYxt2RhyFBgH2A0Iz35emXQzDWf8MJqziFWkbCIdF
lPBF7Nga8KmxZ4JR0VHtBCh0Xf9SjbuZ7o2uqpma1t2IcR0rnWI1EZ92JFFXPrbS
oG5xyeGM06FNnG43P9PXmG/CziFm4Knk9jSPK8Kik/pug3ixKkufqZ4LKzkhQaX5
Do+E3uw4KrqlCkrQ1T9NDOHp1ODOxuEGDhkkWaNU+DXFi9vganF+CNhLJR6x0dZg
ZULSWK/cRpbG/LQeiH4G
=u6lv
-----END PGP SIGNATURE-----

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
sub   4096R/4ABF07E3 2012-02-11 [expires: 2013-02-10]
Technical Details
Message-ID: <slrnkik9jp.d2k.admin@snorky.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-microsoft.public.project.pro_and_server.20141024.mbox.gz!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!.POSTED.2a01:4f8:100:5243::4!not-for-mail
References: <9fe87ca07094d0ad6891c4e50ac43525@anonrem>

Show Full Headers
Complete Article Headers
Message-ID: <slrnkik9jp.d2k.admin@snorky.mixmin.net>
Subject: Re: Question about smtp method in python
Date: Sun, 24 Feb 2013 14:40:57 +0000
From: Zax <admin@mixmin.net>
References: <9fe87ca07094d0ad6891c4e50ac43525@anonrem>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-microsoft.public.project.pro_and_server.20141024.mbox.gz!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!.POSTED.2a01:4f8:100:5243::4!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: Mixmin
Injection-Date: Sun, 24 Feb 2013 14:40:57 +0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="2a01:4f8:100:5243::4";
 logging-data="20216"; mail-complaints-to="abuse@mixmin.net"
User-Agent: slrn/pre1.0.0-49 (Linux)
Lines: 64