tls on
tls_certcheck off
user mart@martlubbers.net
+passwordeval gpg --quiet --batch --use-agent -d ~/passwd.gpg | grep -i mail | awk '{print $3}'
from mart@martlubbers.net
set my_hdr="X-PGP-Key: http://www.martlubbers.net/mart@martlubbers.net.asc"
# Receiving and sending email
-set my_msmtp_pass=`gpg -d ~/passwd.gpg | grep -i mail | awk '{print $3}'`
-set sendmail="/usr/local/bin/msmtp -C /home/mart/.mutt/msmtp --password=$my_msmtp_pass -f mart@martlubbers.net -a net"
+set my_msmtp_pass=`gpg -d ~/passwd.gpg >> /dev/null`
+set sendmail="msmtp -C /home/mart/.mutt/msmtp -f mart@martlubbers.net -a net"
# Bindings index
bind index gg first-entry
# Macros
macro index S "<shell-escape>mutt-notmuch-py ~/.mutt/mail/temp<enter><change-folder-readonly>+temp<enter>" "search mail (using notmuch)"
-macro index,pager $ "<sync-mailbox><shell-escape>offlineimap -c ~/.mutt/offlineimaprc -k Repository_Remote:remotepass=$my_msmtp_pass &<enter>" "Force refresh"
+macro index,pager $ "<sync-mailbox><shell-escape>offlineimap -c ~/.mutt/offlineimaprc &<enter>" "Force refresh"
macro index,pager \CT "<tag-pattern>~C vim@vim.org | ~C vim_use<enter><tag-prefix-cond><save-message>=vim<enter><end-cond><tag-pattern>~C lists.debian.org<enter><tag-prefix-cond><save-message>=debian<enter><end-cond><tag-pattern>~C mutt-users@mutt.org<enter><tag-prefix-cond><save-message>=mutt<enter><end-cond><tag-pattern>~C praat-users<enter><tag-prefix-cond><save-message>=praat<enter><end-cond><sync-mailbox>" "Clean up mailing lists"
macro index,pager \cb "|urlview\n"
--- /dev/null
+#!/bin/env python
+# -*- coding: utf-8 -*-
+
+import subprocess
+
+def mailpasswd():
+ args = '/usr/bin/gpg --use-agent --quiet --batch -d /home/mart/passwd.gpg | grep -i mail | awk \'{print $3}\''
+ try:
+ return subprocess.check_output(args, shell='/bin/bash').strip()
+ except subprocess.CalledProcessError:
+ return ""
[general]
+pythonfile = ~/.mutt/offlineimap.py
metadata = ~/.mutt/offlineimap_meta
accounts = net
ui = quiet
[Repository Remote]
type = IMAP
+remotepasseval = mailpasswd()
remotehost = mail.martlubbers.net
remoteuser = mart@martlubbers.net
ssl = yes