sed -i "s/account $mwaddr/&\ntls_trust_file\ntls_fingerprint $mwfingerprint/" "$mwmsmtprc" &>/dev/null
}
@@ -261,10 +258,10 @@ _mwprofiles() {
if [ "$mwtype" = "offline" ]; then # not online, actually outside mutt
if [ "${mwkind::3}" = "pop" ]; then
! type "$prefix/bin/getmail" >/dev/null && printf "\033[31mFor POP3 \`getmail\` must be installed to use \`mw\`. You can do that afterwards.\\n\033[0m"
! type getmail >/dev/null && printf "\033[31mFor POP3 \`getmail\` must be installed to use \`mw\`. You can do that afterwards.\\n\033[0m"
_mwpop
else
! type "$prefix/bin/mbsync" >/dev/null && printf "\033[31mFor IMAP \`mbsync\` must be installed to use \`mw\`. You can do that afterwards.\\n\033[0m"
! type mbsync >/dev/null && printf "\033[31mFor IMAP \`mbsync\` must be installed to use \`mw\`. You can do that afterwards.\\n\033[0m"
_mwmbsync
fi
_mwsmtp
@@ -285,7 +282,6 @@ _mwtryconnect() {
grep "+OK" && mwmailboxes="INBOX"
else
# for online do without mbsync, i.e. don't require it for mail setup, either
# mwmailboxes="$($mwmbsyncbin -l $mwaddr | sed 's/\//./')" >/dev/null 2>&1
mwmailboxes="$(python -c "from imaplib import $mwi;m=$mwi('$mwurl');m.login('$mwlogin','$mwpw');b=m.list()[1];print('\n'.join(e.split(b' \"/\" ')[-1].strip(b'\"').decode() for e in b if all(x not in e for x in [b'[Gmail]/All Mail',b'Noselect',b'HasChildren'])));m.logout()")"
@@ -501,7 +497,7 @@ macro index gm "<shell-escape>mw $mwaddr<enter>" "sync mail $mwaddr"