{%@@ for name, info in mail.items() | reverse @@%}

IMAPStore {{@@ name @@}}-remote
Host {{@@ info.imap @@}}
Port  993
User {{@@ info.user @@}}
PassCmd "_pass_get {{@@ info.pass @@}}"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

MaildirStore {{@@ name @@}}-local
Subfolders Verbatim
Path  ~/.local/share/mail/{{@@ name @@}}/
Inbox ~/.local/share/mail/{{@@ name @@}}/INBOX
Flatten .

Channel {{@@ name @@}}
Expunge Both
Far :{{@@ name @@}}-remote:
Near :{{@@ name @@}}-local:
Patterns * !"[Gmail]/All Mail"
Create Both
SyncState *

{%@@ endfor @@%}

# vim: ft=sh
