mbsync
mbsync
's default behavior is to look for a configuration file in
$HOME/.mbsyncrc
, but this has been modified by aliasing mbsync
to
the same command with an additional --config
flag pointing to the
new location.
Configure an IMAP account for my personal email address:
IMAPAccount personal
Host imap.gmail.com
User ba.tahaaziz@gmail.com
PassCmd "pass smtp.gmail.com:25/ba.tahaaziz"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
Configure the IMAPStore
for the previous IMAP account, which maps to
the remote location of the MaildirStore
.
IMAPStore personal-remote Account personal
Configure the MaildirStore
, this is the location where my mail is
stored.
MaildirStore personal-local Path ~/.local/share/mail/personal/ Inbox ~/.local/share/mail/personal/Inbox SubFolders Verbatim
Define the channel which connects the far and near ends of this personal account configuration.
Channel personal
Far :personal-remote:
Near :personal-local:
Patterns * !"[Gmail]/Drafts"
Create Both
Expunge Both
SyncState *
Configure an IMAP account for my university email address:
IMAPAccount university Host imap.gmail.com User tahaaziz.benali@esprit.tn PassCmd "pass smtp.gmail.com:25/tahaaziz.benali" SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore university-remote Account university MaildirStore university-local Path ~/.local/share/mail/university/ Inbox ~/.local/share/mail/university/Inbox SubFolders Verbatim Channel university Far :university-remote: Near :university-local: Patterns * !"[Gmail]/Drafts" Create Both Expunge Both SyncState *