diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-03-28 16:12:55 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-03-28 16:12:55 -0500 |
commit | 10f61576fd8789876fa48ec985ea72389c254cb9 (patch) | |
tree | 9499fbde8e04e609f8429ec45a91ddedd5350eea /mbsync | |
parent | 4309d46cd57cfb7a63a29403d8153ced39a32443 (diff) |
feat(mbsync): add mbsync configs for syncing IMAP gmail
Diffstat (limited to 'mbsync')
-rw-r--r-- | mbsync/.config/mbsync/mbsyncrc | 48 | ||||
-rw-r--r-- | mbsync/.config/systemd/user/mbsync.service | 9 | ||||
-rw-r--r-- | mbsync/.config/systemd/user/mbsync.timer | 10 |
3 files changed, 67 insertions, 0 deletions
diff --git a/mbsync/.config/mbsync/mbsyncrc b/mbsync/.config/mbsync/mbsyncrc new file mode 100644 index 0000000..e8fe3e1 --- /dev/null +++ b/mbsync/.config/mbsync/mbsyncrc @@ -0,0 +1,48 @@ +IMAPAccount gmail +Host imap.gmail.com +User tobyv13@gmail.com +PassCmd "pass gmail" +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +IMAPStore gmail-remote +Account gmail + +MaildirStore gmail-local +Path ~/.local/share/mail/gmail/ +Inbox ~/.local/share/mail/gmail/INBOX + +Channel gmail-inbox +Far :gmail-remote: +Near :gmail-local: +Patterns "INBOX" +Create Both +Expunge Both +SyncState * + +Channel gmail-drafts +Far :gmail-remote:"[Gmail]/Drafts" +Near :gmail-local:drafts +Create Both +Expunge Both +SyncState * + +Channel gmail-sent +Far :gmail-remote:"[Gmail]/Sent Mail" +Near :gmail-local:sent +Create Both +Expunge Both +SyncState * + +Channel gmail-trash +Far :gmail-remote:"[Gmail]/Trash" +Near :gmail-local:trash +Create Both +Expunge Both +SyncState * + +Group gmail +Channel gmail-inbox +Channel gmail-drafts +Channel gmail-sent +Channel gmail-trash diff --git a/mbsync/.config/systemd/user/mbsync.service b/mbsync/.config/systemd/user/mbsync.service new file mode 100644 index 0000000..6a03bfc --- /dev/null +++ b/mbsync/.config/systemd/user/mbsync.service @@ -0,0 +1,9 @@ +[Unit] +Description=Mailbox synchronization service + +[Service] +Type=oneshot +ExecStart=/usr/bin/mbsync -c ${XDG_CONFIG_HOME}/mbsync/mbsyncrc -Va + +[Install] +WantedBy=default.target diff --git a/mbsync/.config/systemd/user/mbsync.timer b/mbsync/.config/systemd/user/mbsync.timer new file mode 100644 index 0000000..82ebb83 --- /dev/null +++ b/mbsync/.config/systemd/user/mbsync.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Mailbox synchronization timer + +[Timer] +OnBootSec=2m +OnUnitActiveSec=5m +Unit=mbsync.service + +[Install] +WantedBy=timers.target |