I'd like mutt (mutt-kz, actually -- I'd love to migrate to neomutt but that's a bigger project) to get my SMTP password from pass so I don't have to keep it stored in cleartext in my config file, but I'm not sure how to properly pass the password into my .muttrc.
This is what I have in .muttrc:
source ~/.mutt/pass.sh|
set smtp_pass = $my_pass
And then .mutt/pass.sh contains:
#! /bin/bash
my_pass=$(pass Example/user)
If I add echo ${my_pass} to pass.sh and run it from the command line, it does echo my password.
When I launch mutt-kz I'm prompted to unlock my pass gpg key, so something is working, but when I try to send mail from Mutt it asks for my SMTP password and fails if I don't provide it the message isn't sent: ("SASL authentication failed")
So ... how do I correctly pass the variable from my shell script to my .muttrc?