Added offlineimap configuration
This commit is contained in:
parent
0df1588c70
commit
131edb23fe
3 changed files with 65 additions and 0 deletions
|
@ -26,6 +26,9 @@ linkmy irssi .irssi
|
||||||
linkmy ncmpcpp .ncmpcpp
|
linkmy ncmpcpp .ncmpcpp
|
||||||
# NEWSBEUTER
|
# NEWSBEUTER
|
||||||
linkmy newsbeuter .newsbeuter
|
linkmy newsbeuter .newsbeuter
|
||||||
|
# OFFLINEIMAP
|
||||||
|
linkmy offlineimaprc .offlineimaprc
|
||||||
|
linkmy offlineimap.py .offlineimap.py
|
||||||
# VIM
|
# VIM
|
||||||
linkmy vimrc .vimrc
|
linkmy vimrc .vimrc
|
||||||
linkmy vim .vim
|
linkmy vim .vim
|
||||||
|
|
9
offlineimap.py
Normal file
9
offlineimap.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
def getuser(host):
|
||||||
|
import netrc
|
||||||
|
mynet = netrc.netrc()
|
||||||
|
return mynet.authenticators(host)[0]
|
||||||
|
|
||||||
|
def getpassword(host):
|
||||||
|
import netrc
|
||||||
|
mynet = netrc.netrc()
|
||||||
|
return mynet.authenticators(host)[2]
|
53
offlineimaprc
Normal file
53
offlineimaprc
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[general]
|
||||||
|
# NOTE: cronjob calls the quiet UI with -u
|
||||||
|
ui = TTY.TTYUI
|
||||||
|
accounts = arch,gmail,iactor
|
||||||
|
pythonfile = ~/.offlineimap.py
|
||||||
|
|
||||||
|
[Account arch]
|
||||||
|
localrepository = arch-local
|
||||||
|
remoterepository = arch-remote
|
||||||
|
|
||||||
|
[Account gmail]
|
||||||
|
localrepository = gmail-local
|
||||||
|
remoterepository = gmail-remote
|
||||||
|
|
||||||
|
[Account iactor]
|
||||||
|
localrepository = iactor-local
|
||||||
|
remoterepository = iactor-remote
|
||||||
|
|
||||||
|
[Repository arch-local]
|
||||||
|
type = Maildir
|
||||||
|
localfolders = ~/Mail/arch
|
||||||
|
|
||||||
|
[Repository gmail-local]
|
||||||
|
type = Maildir
|
||||||
|
localfolders = ~/Mail/gmail
|
||||||
|
|
||||||
|
[Repository iactor-local]
|
||||||
|
type = Maildir
|
||||||
|
localfolders = ~/Mail/iactor
|
||||||
|
|
||||||
|
[Repository arch-remote]
|
||||||
|
type = Gmail
|
||||||
|
remoteusereval = getuser("imap.google.com-arch")
|
||||||
|
remotepasseval = getpassword("imap.google.com-arch")
|
||||||
|
realdelete = no
|
||||||
|
|
||||||
|
nametrans = lambda folder: re.sub('.*Spam$', 'spam', re.sub('.*Drafts$', 'drafts', re.sub('.*Sent Mail$', 'sent', re.sub('.*Starred$', 'flagged', re.sub('.*Trash$', 'trash', re.sub('.*All Mail$', 'archive', folder))))))
|
||||||
|
|
||||||
|
[Repository gmail-remote]
|
||||||
|
type = Gmail
|
||||||
|
remoteusereval = getuser("imap.google.com")
|
||||||
|
remotepasseval = getpassword("imap.google.com")
|
||||||
|
realdelete = no
|
||||||
|
|
||||||
|
nametrans = lambda folder: re.sub('.*Spam$', 'spam', re.sub('.*Drafts$', 'drafts', re.sub('.*Sent Mail$', 'sent', re.sub('.*Starred$', 'flagged', re.sub('.*Trash$', 'trash', re.sub('.*All Mail$', 'archive', folder))))))
|
||||||
|
|
||||||
|
[Repository iactor-remote]
|
||||||
|
type = IMAP
|
||||||
|
remotehost = mail.iactor.nl
|
||||||
|
remoteusereval = getuser("mail.iactor.nl")
|
||||||
|
remotepasseval = getpassword("mail.iactor.nl")
|
||||||
|
|
||||||
|
# vim: ft=cfg tw=0
|
Loading…
Reference in a new issue