ignore IMAPAccount in profile

This commit is contained in:
Luke Smith 2019-04-19 18:19:28 -04:00
parent 6f9b638288
commit 36eaa07075
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

10
mw
View File

@ -26,17 +26,14 @@ port $sport
from $login from $login
user $login user $login
passwordeval \"pass mutt-wizard-$title\"" passwordeval \"pass mutt-wizard-$title\""
mbsync_profile="IMAPAccount $title mbsync_profile="IMAPStore $title-remote
Host $imap Host $imap
User $login
Port $iport Port $iport
User $login
PassCmd \"pass mutt-wizard-$title\" PassCmd \"pass mutt-wizard-$title\"
SSLType IMAPS SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt CertificateFile /etc/ssl/certs/ca-certificates.crt
IMAPStore $title-remote
Account $title
MaildirStore $title-local MaildirStore $title-local
Subfolders Verbatim Subfolders Verbatim
Path ~/.local/share/mail/$title/ Path ~/.local/share/mail/$title/
@ -47,7 +44,6 @@ Expunge Both
Master :$title-remote: Master :$title-remote:
Slave :$title-local: Slave :$title-local:
Patterns * !\"[Gmail]/All Mail\" Patterns * !\"[Gmail]/All Mail\"
Create Both Create Both
SyncState * SyncState *
# End profile" # End profile"
@ -169,7 +165,7 @@ EOF
echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source $accdir/$title.muttrc<enter><change-folder>!<enter>;<check-stats>'" >> "$muttdir/personal.muttrc" echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source $accdir/$title.muttrc<enter><change-folder>!<enter>;<check-stats>'" >> "$muttdir/personal.muttrc"
! grep "^source.*.muttrc" "$muttdir/personal.muttrc" >/dev/null && echo "source $accdir/$title.muttrc" >> "$muttdir/personal.muttrc" ! grep "^source.*.muttrc" "$muttdir/personal.muttrc" >/dev/null && echo "source $accdir/$title.muttrc" >> "$muttdir/personal.muttrc"
trysync && finalize trysync && finalize
[ "$accounttype" = "offline" ] || sed -i "/IMAPAccount $title$/,/# End profile/d" "$mbsyncrc" [ "$accounttype" = "offline" ] || sed -i "/IMAPStore $title$/,/# End profile/d" "$mbsyncrc"
} }
getpass() { pass rm -f "mutt-wizard-$title" 2>/dev/null ; pass insert "mutt-wizard-$title" ;} getpass() { pass rm -f "mutt-wizard-$title" 2>/dev/null ; pass insert "mutt-wizard-$title" ;}