mutt: add custom command to get pass
This commit is contained in:
parent
f6a17f3726
commit
57f6cb3611
|
@ -39,9 +39,11 @@ variables:
|
|||
personal:
|
||||
user: lelgenio
|
||||
mail: disroot.org
|
||||
pass: disroot.org
|
||||
work:
|
||||
user: leonardo@wopus.com.br
|
||||
mail: wopus.com.br
|
||||
pass: wopus_email
|
||||
|
||||
|
||||
###############################################################
|
||||
|
|
|
@ -4,7 +4,7 @@ IMAPStore {{@@ name @@}}-remote
|
|||
Host {{@@ info.mail @@}}
|
||||
Port 993
|
||||
User {{@@ info.user.split("@")[0] @@}}@{{@@ info.mail @@}}
|
||||
PassCmd "_pass_get {{@@ info.mail @@}}"
|
||||
PassCmd "_pass_get {{@@ info.pass @@}}"
|
||||
SSLType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ set my_source_command = \
|
|||
|
||||
{%@@ for name, info in mail.items() @@%}
|
||||
set my_source_command = \
|
||||
"_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user.split("@")[0] @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' |"
|
||||
"_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user.split("@")[0] @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' '{{@@ info.pass @@}}' |"
|
||||
macro index,pager <f{{@@ loop.index @@}}> "<sync-mailbox><enter-command>source \"$my_source_command\"<enter><change-folder>!<enter>"
|
||||
{%@@ endfor @@%}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ my_path="$1"
|
|||
my_name="$2"
|
||||
my_user="$3"
|
||||
my_host="$4"
|
||||
my_pass=`_pass_get "$my_host"`
|
||||
my_pass="$5"
|
||||
|
||||
cat <<EOF
|
||||
set realname = "$my_name"
|
||||
|
|
Reference in New Issue