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

rbw: permission denied when using it in msmtp "passwordeval" configuration #86

Closed
xluthi opened this issue Apr 5, 2022 · 1 comment
Closed

Comments

@xluthi
Copy link

xluthi commented Apr 5, 2022

I'm using msmtp to send email from my Debian machine via my remote SMTP server that requires authentication.
Msmtp allows to have a command launched to get the password, thanks to his passwordeval directive. It works with gpg with specific options (--quiet --no-tty), but it doesn't work with rbw:

$ echo "test" | msmtp -a default [email protected]
sh: 1: rbw: Permission denied
msmtp: cannot read output of 'rbw get mail.example.org [email protected]'

My passwordeval directive in ~/.msmtprc is trivial: passwordeval "rbw get mail.example.org [email protected]".

I suspect an issue with the way rbw is managing stdin, especially because there is a specific warning in msmtp man page about passwordeval:

‘passwordeval [eval]’

Set the password for authentication to the output (stdout) of the command eval. This can be used e.g. to decrypt password files on the fly or to query key rings, and thus to avoid storing cleartext passwords.
Note that the eval command must not mess with standard input (stdin) because that is where msmtp reads the mail from. If in doubt, append < /dev/null to eval.

Do you have any clue to make rbw work seamlessly with msmtp ?

Thanks a lot!

PS: rbw 1.4.3 - works perfectly from the CLI, or with mbsync/isync with PassCmd

@xluthi
Copy link
Author

xluthi commented Apr 5, 2022

I've found the solution myself: I had to look at msmtp side and not rbw :-)

The issue is coming from an over-restrictive appArmor profile for msmtp on Debian.
See marlam/msmtp#26 (comment).

@xluthi xluthi closed this as completed Apr 5, 2022
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

1 participant