Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always prompts for keyring password on Ubuntu #16

Closed
loraxman opened this issue Sep 10, 2015 · 20 comments
Closed

always prompts for keyring password on Ubuntu #16

loraxman opened this issue Sep 10, 2015 · 20 comments

Comments

@loraxman
Copy link

After registering the user and email, it prompts everytime for the encrypted keyring password.
yag = yagmail.SMTP()
Please enter password for encrypted keyring:

Works fine on Mac Os

@kootenpv
Copy link
Owner

I'll test this on a Ubuntu VM and let you know. Thanks for filing!

@kootenpv
Copy link
Owner

Using Python 3.4 and Ubuntu 14.10, I can not reproduce.

What could be the thing is that perhaps you are not consistent with what you've saved? A username (e.g. kootenpv) would be stored differently as an emailaddress (e.g. kootenpv@gmail.com). Both can be used to login (if missing @..., it will add @gmail.com).

However, if you've saved it in one style, it does not work for the other. Could that be the case?

Let me know if there is anything else that you could think that has to do with it.

@murtraja
Copy link

i too have this issue!
steps to reproduce

  1. go to pythonanywhere.com
  2. create an account
  3. open bash
  4. pip install --user keyrings.alt yagmail
  5. python
  6. import yagmail
  7. yagmail.register("user","pass")
  8. set keyring password here
  9. now create .yagmail file and test with SMTP
  10. it asks for keyring password EVERY time

@kootenpv
Copy link
Owner

.yagmail file should be in $HOME directory. Is it? Make sure that the .yagmail file just contains the username.

@kootenpv
Copy link
Owner

Let me know if you'd like me to add a "do you want to save a .yagmail file?" after the question whether or not to save in keyring.

@murtraja
Copy link

yagmail_prob

do i need to give a terminating end line in the yagfile?

@kootenpv
Copy link
Owner

No need for it. Make sure the username of gmail is in .yagmail, not the username on the PC. Hopefully that helps.

@kootenpv
Copy link
Owner

You can actually test by using "yagmail" command on the command line to see if it worked (if it works, no prompt, and it should send an email to yourself without subject and without contents)

@murtraja
Copy link

yagmail_prob_yagmail_command

@murtraja
Copy link

it turns out that the username of PC and gmail are the same!

@kootenpv
Copy link
Owner

So did it work in the end?

@GeorgHo
Copy link

GeorgHo commented Feb 19, 2016

Hello,
I have the same problem on a Debian system (Raspberry Pi).
He always asks for a Keyring Key to decrypt the Keyring file where the password is stored in.
I have installed the keyrings.alt backend.
I have not found a solution to store this password, so that it is dragged automatically.

@kootenpv
Copy link
Owner

@GeorgHo Perhaps it could work to just put the password in the script in that occasion then?

@GeorgHo
Copy link

GeorgHo commented Feb 24, 2016

Hi kootenpv,
I solved the problem by entered the login data in the script.
Now everything works fine!

@kootenpv
Copy link
Owner

@GeorgHo Great to hear, good luck!

@murtraja
Copy link

@GeorgHo even i did the same to make it work, but it defeats the purpose of securing your username and password. anyone who can view your script can see your username => you can't share your script!

@kootenpv
Copy link
Owner

kootenpv commented Mar 5, 2016

@murtraja I'm thinking OAuth2 is the only way to solve running the script in an automated way without having to use keyring or password in script, and without compromising security. What do you think?

@murtraja
Copy link

murtraja commented Mar 5, 2016

The only reason I am using yagmail is because it DOES NOT use Oauth2.
Reason being it screws up my automation email sending sometimes.!. That
said, if you have already decided, try not to replace, make it like add on.
Thanks
On 5 Mar 2016 15:39, "Pascal van Kooten" notifications@github.com wrote:

@murtraja https://github.com/murtraja I'm thinking OAuth2 is the only
way to solve running the script in an automated way without having to use
keyring or password in script, and without compromising security. What do
you think?


Reply to this email directly or view it on GitHub
#16 (comment).

@Jokerbullot
Copy link

I do have the same issue on Debian (Raspberry Pi).
I do have a .yagmail file in my home with just my gmail login (without @gmail.com)

when running python3 test_mail.py it asks me the keyring pwd and then succesfully send the email.

I tried adding or removing my login in the yagmail.SMTP() call but it does not change anything.

Any1 found a way to solve this ?

Tyvm all.

@kootenpv
Copy link
Owner

Oauth2 support has been added as of 22cb687

This should be the way forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants