-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdot_offlineimaprc.tmpl
140 lines (130 loc) · 5.03 KB
/
dot_offlineimaprc.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{{ $unified_entry := "keyring/unified" -}}
{{ $unified_username := (keepassxc $unified_entry).UserName -}}
{{ $unified_password := (keepassxc $unified_entry).Password -}}
{{ $unified_imap_server := keepassxcAttribute $unified_entry "ImapServer" -}}
{{ $unified_imap_port := keepassxcAttribute $unified_entry "ImapPort" -}}
{{ $sudo_entry := "keyring/sudo" -}}
{{ $sudo_username := (keepassxc $sudo_entry).UserName -}}
{{ $sudo_password := (keepassxc $sudo_entry).Password -}}
{{ $sudo_imap_server := keepassxcAttribute $sudo_entry "ImapServer" -}}
{{ $sudo_imap_port := keepassxcAttribute $sudo_entry "ImapPort" -}}
{{ $push_entry := "keyring/push" -}}
{{ $push_username := (keepassxc $push_entry).UserName -}}
{{ $push_password := (keepassxc $push_entry).Password -}}
{{ $push_imap_server := keepassxcAttribute $push_entry "ImapServer" -}}
{{ $push_imap_port := keepassxcAttribute $push_entry "ImapPort" -}}
{{ $icloud_entry := "keyring/icloud" -}}
{{ $icloud_username := (keepassxc $icloud_entry).UserName -}}
{{ $icloud_password := (keepassxc $icloud_entry).Password -}}
{{ $icloud_imap_server := keepassxcAttribute $icloud_entry "ImapServer" -}}
{{ $icloud_imap_port := keepassxcAttribute $icloud_entry "ImapPort" -}}
{{ $work_entry := "keyring/work" -}}
{{ $work_username := (keepassxc $work_entry).UserName -}}
{{ $work_password := (keepassxc $work_entry).Password -}}
{{ $work_imap_server := keepassxcAttribute $work_entry "ImapServer" -}}
{{ $work_imap_port := keepassxcAttribute $work_entry "ImapPort" -}}
[general]
# This lists the accounts that I will be configuring.
accounts = unified, push, sudo
# offlineimap by default will fsync() to try and reduce chances for data
# inconsistency. In most cases disabling this is fine, and also reduces
# the number write cycles.
fsync = false
# This is the path to the aforementioned python environment that will be used.
# This helps prevent offlineimap hanging when network connection is lost.
socktimeout = 60
[Account unified]
localrepository = unified-local
remoterepository = unified-remote
synclabels = yes
labelsheader = X-Keywords
# postsynchook = ~/.config/offlineimap/hooks/postsync-unified
[Repository unified-local]
type = Maildir
localfolders = ~/.mail/unified
[Repository unified-remote]
type = IMAP
remotehost = {{ $unified_imap_server }}
remoteport = {{ $unified_imap_port }}
remoteusereval = "{{ $unified_username }}"
remotepasseval = "{{ $unified_password }}"
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
folderfilter = lambda foldername: foldername in ['Inbox', 'Sent', 'Drafts', 'Trash', 'Junk', 'Archive']
trashfolder = /Trash
[Account sudo]
localrepository = sudo-local
remoterepository = sudo-remote
synclabels = yes
labelsheader = X-Keywords
# postsynchook = ~/.config/offlineimap/hooks/postsync-sudo
[Repository sudo-local]
type = Maildir
localfolders = ~/.mail/sudo
[Repository sudo-remote]
type = IMAP
remotehost = {{ $sudo_imap_server }}
remoteport = {{ $sudo_imap_port }}
remoteusereval = "{{ $sudo_username }}"
remotepasseval = "{{ $sudo_password }}"
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
folderfilter = lambda foldername: foldername in ['INBOX', 'Sent', 'Archive', 'Drafts', 'Trash', 'Spam']
trashfolder = /Trash
[Account push]
localrepository = push-local
remoterepository = push-remote
synclabels = yes
labelsheader = X-Keywords
# postsynchook = ~/.config/offlineimap/hooks/postsync-push
[Repository push-local]
type = Maildir
localfolders = ~/.mail/push
[Repository push-remote]
type = IMAP
remotehost = {{ $push_imap_server }}
remoteport = {{ $push_imap_port }}
remoteusereval = "{{ $push_username }}"
remotepasseval = "{{ $push_password }}"
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
folderfilter = lambda foldername: foldername in ['Inbox', 'Sent', 'Drafts', 'Archive', 'Trash', 'Junk', 'Archive']
trashfolder = /Trash
[Account icloud]
localrepository = icloud-local
remoterepository = icloud-remote
synclabels = yes
labelsheader = X-Keywords
# postsynchook = ~/.config/offlineimap/hooks/postsync-icloud
[Repository icloud-local]
type = Maildir
localfolders = ~/.mail/icloud
[Repository icloud-remote]
type = IMAP
remotehost = {{ $icloud_imap_server }}
remoteport = {{ $icloud_imap_port }}
remoteusereval = "{{ $icloud_username }}"
remotepasseval = "{{ $icloud_password }}"
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
folderfilter = lambda foldername: foldername in ['Inbox', 'Sent']
trashfolder = /Trash
[Account work]
localrepository = work-local
remoterepository = work-remote
synclabels = yes
labelsheader = X-Keywords
# postsynchook = ~/.config/offlineimap/hooks/postsync-work
[Repository work-local]
type = Maildir
localfolders = ~/.mail/work
[Repository work-remote]
type = Gmail
remotehost = {{ $work_imap_server }}
remoteport = {{ $work_imap_port }}
remoteusereval = "{{ $work_username }}"
remotepasseval = "{{ $work_password }}"
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
# folderfilter = lambda foldername: foldername in ['INBOX', 'Archive', 'Sent Messages', 'Drafts', 'Deleted Messages']
# trashfolder = /Trash