Thread View: alt.privacy.anon-server
5 messages
5 total messages
Started by admin2
Sun, 24 Feb 2013 13:30
Question about smtp method in python
Author: admin2
Date: Sun, 24 Feb 2013 13:30
Date: Sun, 24 Feb 2013 13:30
36 lines
2464 bytes
2464 bytes
If the fake 'From' address on this message belongs to you,
send an email to: compglok <AT> suremail <DOT> info
and your address will be blocked from coming through this
remailer.
#------------
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 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.
For any other mail server, I get a 'relay not allowed'
message which is consistent with not being authenticated
with the server.
What I am using seems to be in line with examples I have
seen, but who knows?
Any ideas?
--
The message above came through a remailer. The From address is a
fake, and the contents of the message should be considered dodgy.
Re: Question about smtp method in python
Author: admin2
Date: Sun, 24 Feb 2013 14:28
Date: Sun, 24 Feb 2013 14:28
26 lines
1870 bytes
1870 bytes
If the fake 'From' address on this message belongs to you,
send an email to: compglok <AT> suremail <DOT> info
and your address will be blocked from coming through this
remailer.
#------------
admin2@suremail.info wrote:
>
> Here is the code I am using to send messages using smtp:
>
> server = smtplib.SMTP('not my isp mailserver')
> server.login = ('userid','password')
<snip>
>
> What seems to be happening is that the server.login
> credentials are ignored.
I finally spotted it. The server.login should read:
server.login('userid','password')
--
The message above came through a remailer. The From address is a
fake, and the contents of the message should be considered dodgy.
Re: Question about smtp method in python
Author: Zax
Date: Sun, 24 Feb 2013 14:40
Date: Sun, 24 Feb 2013 14:40
65 lines
3437 bytes
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]
Re: Question about smtp method in python
Author: Anonymous
Date: Sun, 24 Feb 2013 16:52
Date: Sun, 24 Feb 2013 16:52
32 lines
2461 bytes
2461 bytes
> If the fake 'From' address on this message belongs to you,
> send an email to: compglok <AT> suremail <DOT> info
> and your address will be blocked from coming through this
> remailer.
> #------------
> 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 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.
> For any other mail server, I get a 'relay not allowed'
> message which is consistent with not being authenticated
> with the server.
> What I am using seems to be in line with examples I have
> seen, but who knows?
> Any ideas?
Is this possibly being csused by ISP port blocking?
Re: Question about smtp method in python
Author: admin2
Date: Sun, 24 Feb 2013 17:58
Date: Sun, 24 Feb 2013 17:58
26 lines
2232 bytes
2232 bytes
If the fake 'From' address on this message belongs to you,
send an email to: compglok <AT> suremail <DOT> info
and your address will be blocked from coming through this
remailer.
#------------
Zax wrote:
> if smtp.has_extn("AUTH"):
> smtp.login("UID", "PWD")
Thanks. I added that bit of code and tested with two smtp servers
that are not my isp's. They both required/allowed auth.
Then I tried it with my isp's smtp server and it did not require
auth and did not allow it. I suppose that is because it knows
that it owns my ip; but if there are other 'freebie' smtp servers
that do not require or allow auth, it is good to be able to allow
the user to connect to them without abending (as we used to
say in the mainframe days).
--
The message above came through a remailer. The From address is a
fake, and the contents of the message should be considered dodgy.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads