Sending gmail with no clear password

Erik python at lucidity.plus.com
Mon Mar 28 16:41:53 EDT 2016


Hi. It's hard to understand what your question is.

On 28/03/16 20:55, zljubisicmob at gmail.com wrote:
 > I have a python3 script that runs 24/7 on linux (raspberry pi)
 > server. It would be very nice for the script to be able to send an
 > email message about certain statuses.

Reading between the lines, am I correct in stating that:

1) You preferably want to send an email with no authentication at all.
2) If authentication is /required/ by the server you are contacting then 
you don't want the password to be stored in plain text.
3) The link you pasted does what you want (with no authentication), but 
it doesn't work in Python 3.

> What are my options?

If I have understood you correctly, then the obvious thing is to convert 
the code in the link so that it works in Python 3.

If you can't do that and you need to use authentication, then there's 
only so much you can do to protect your password if you don't want to 
type it in.

Why can't the password be stored in plain text? Who are you trying to 
secure it from?

I suspect that the answer is that you can /obscure/ or /obfuscate/ the 
password (i.e., make it difficult to determine - encrypt it using some 
unique key that's obtained from the server's H/W somehow), but it would 
be very hard to actually /secure/ it from anyone with access to your 
Rpi. If your script can determine the password in plain text 
automatically (without some sort of external input), then so can anyone 
who has logged into the device with the appropriate permissions - if 
only by copying the script and making it display the password rather 
than send it to the server.

E.



More information about the Python-list mailing list