Answer the question
In order to leave comments, you need to log in
How to set up authentication on yandex mail without using an open password?
There is a script that collects mail from the mailbox using open password transmission
username = '[email protected]'
password = 'password'
ymail = imaplib.IMAP4_SSL('imap.yandex.ru', '993')
ymail.login(username, password)
ymail.login_cram_md5(username, password)
Answer the question
In order to leave comments, you need to log in
Firstly, your password transmission is not open, it is over SSL, but you can really merge from the file. But no matter what you do - you can still get access to the mail, having access to your script, at least by modifying your own script. Only the master password can be protected. This can be done by enabling two-factor authentication and generating an app password as recommended above. The application password is still the same password, but it can only be used to access mail.
Other authentication methods can also be used. CRAM-MD5 is not supported by Yandex, because it does not store the password as a hash, XOAuth is supported
https://tech.yandex.com/oauth/
here is an example of how to log in to GMail, it should also work for Yandex:
https://stackoverflow.com/questions/5193707/use-im...
but in practice this method will not provide additional security.
If I were you, I would not bother with authentication, but would start a separate "unsafe" box, where I would redirect only those letters that need to be processed on the server, delete messages after parsing by the server and not bother with the security of this box. If such a mailbox is compromised, you can simply create a new mailbox and redirect messages to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question