Linux 如何在mbsync中设置密码命令?

Linux 如何在mbsync中设置密码命令?,linux,email,mbsync,isync,Linux,Email,Mbsync,Isync,对于isync/mbsync,我可以使用PassCmd而不是Pass: PassCmd [+]command Specify a shell command to obtain a password rather than specifying a password directly. This allows you to use password files and agents. The command must produce exactly one line on stdout; th

对于isync/mbsync,我可以使用
PassCmd
而不是
Pass

PassCmd [+]command

Specify a shell command to obtain a password rather than specifying a password directly. This allows you to use password files and agents. The command must produce exactly one line on stdout; the trailing newline is optional. Prepend + to the command to indicate that it produces TTY output (e.g., a decryption password prompt); failure to do so will merely produce messier output.
所以我试过:

PassCmd+“/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail bridge”

PassCmd“/nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass protonmail bridge”

和其他变体,但没有任何效果-我一直使用SASL机制平原进行身份验证…IMAP命令“AUTHENTICATE PLAIN”返回错误:没有后端/凭据:密码不正确

然而:在
mbsync
中对
pass
的其他调用与预期的一样工作,我正以同样的方式编写它们

如果改用
传递密码
,我可以让mbsync工作,但我不想以纯文本形式存储密码

我可以验证
pass
命令的输出是否与使用
pass
的密码完全相同。所以出了点问题,我想不出来

我还尝试在文件中添加一个尾随的换行符,并添加几个换行符。我也尝试将
|head
附加到命令中,看看是否有效

如何使PassCmd按预期工作


顺便说一句,我在NixOS上。

将密码作为您通常使用的“pass show whatever”输出 你也试过了吗

“nix/store/wjn7l5jdpsd5kb47z0dzqp37y7m533rb-password-store-1.7.3/bin/pass show”