☰
Current Page
Main Menu
Home
Home
Editing
Mail
Edit
Preview
h1
h2
h3
Keybinding
default
vim
emacs
Markup
Markdown
Plain Text
Pod
RDoc
reStructuredText
AsciiDoc
BibTeX
Creole
MediaWiki
Org-mode
Textile
Help 1
Help 1
Help 1
Help 2
Help 3
Help 4
Help 5
Help 6
Help 7
Help 8
Autosaved text is available. Click the button to restore it.
Restore Text
--- title: Mail --- # Messages Client : [mutt][1] Sync : offlineimap, [isync][2] Search : notmuch # Contacts Client : goobook `~/.pim/markferry.net/goobookrc` [DEFAULT] # If not given here, email and password is taken from .netrc using # machine google.com email: blah@markferry.net password: "My obvious password" # or if you want to get the password from a commmand: ;passwordeval: gpg --batch -d ~/.mutt/pw.gpg # The following are optional, defaults are shown cache_filename: ~/.pim/markferry.net/goobook_cache ;cache_expiry_hours: 24 ;filter_groupless_contacts: yes # Offline Mutt IMAP isn't available offline. Configure ~~offlineimap~~ mbsync and notmuch. ## mbsync / isync <https://wiki.archlinux.org/index.php/Isync> (`%i` is the subdirectory of the user home `%h` - required to support multiple separate mail accounts.) ```ini [Unit] Description=Mailbox synchronization service [Service] Type=oneshot ExecStart=/usr/bin/mbsync -c %h/%i/config/isync/mbsyncrc -V -a # a script to classify messages (optional) ExecStartPost=%h/%i/config/notmuch-hook.sh ``` Sync flags when flags are changed locally by watching the notmuch directory: `~/.config/systemd/user/mbsync@.path` ```ini [Path] PathChanged=%h/%i/mail/.notmuch [Install] WantedBy=default.target ``` Finally, sync flags when flags are changed remotely with a timer: `~/.config/systemd/user/mbsync@.timer` ```ini [Unit] Description=Mailbox synchronization timer [Timer] OnBootSec=2m OnUnitActiveSec=10m Unit=mbsync@%i.service [Install] WantedBy=timers.target ``` ## offlineimap `~/.offlineimaprc` example: [general] accounts = markferry # comma separated maxsyncaccounts = 3 pythonfile = ~/.auth.py # see below [Account markferry] localrepository = markferry_Local remoterepository = markferry_Remote status_backend = sqlite autorefresh = 5 quick = 15 [Repository markferry_Local] type = Maildir localfolders = ~/mail keepalive = 180 holdconnectionopen = yes [Repository markferry_Remote] maxconnections = 1 type = Gmail #cert_fingerprint = 85dd311c4a1dbcda6fb53e46004386861844ed2e # disable explicit cert sslcacertfile = /etc/ssl/certs/ca-certificates.crt remoteuser = blah@markferry.net remotepasseval = auth['blah@markferry.net'] realdelete = no folderfilter = lambda foldername: foldername not in ['[Google Mail]/All Mail', '[Google Mail]/Spam'] ## .auth.py A little python dictionary of credentials to isolate it from the rest of the (version-controlled) configs `~/.auth.py`: auth = dict() auth['blah@markferry.net'] = 'My obvious password' ## offlineimap-watchdog Adapted for bash from the [offlineimap FAQ][4] ```shell #!/bin/sh # remove any old instances of this shell script or offlineimap for pid in $(pgrep offlineimap) do if [ $pid -ne $$ ] then kill $pid echo killed old process: $pid fi done # wait for compiz (or whatever) to start and setup wifi #sleep 20 # If offlineimap exits, restart it while ((true)) do ( exec /usr/bin/offlineimap -u quiet ) sleep 60 # prevents extended failure condition done ``` # Links * [Mutt Notmuch Gmail][6] * <http://blog.tshirtman.fr/2013/3/17/mutt-offlineimap-notmuch-nottoomuch> [1]: /Tech/Mutt [2]: http://isync.sourceforge.net/ [3]: Mail?action=sourceblock&num=1 [4]: http://docs.offlineimap.org/en/latest/FAQ.html#what-can-i-do-to-ensure-offlineimap-is-still-running-and-hasnt-crashed [5]: Mail?action=sourceblock&num=2 [6]: http://blog.developwithpassion.com/2013/05/02/getting-up-and-running-with-a-sane-mutt-setup/ <!-- vim: filetype=markdown -->
Uploading file...
Sidebar
# SideBar * [Home][1] * [Projects][2] * * * <!-- --> * [Code][3] * [Tech][4] * [Network][5] * [MediaCentre][6] * [UAV][7] * * * <!-- --> * [Travel][8] * [Music][9] * [Horse Riding][10] * [Study][11] * [Games][12] * [Other Activities][13] * * * <!-- --> * [Car][14] * [House][15] * [Watch][16] * [Clothing][17] * [Miscellany][18] * * * [1]: /Home [2]: /Projects [3]: /Code/Code [4]: /Tech/Tech [5]: /Network/Network [6]: /MediaCentre/MediaCentre [7]: /UAV/UAV [8]: /Travel/Travel [9]: /Music/Music [10]: /HorseRiding/HorseRiding [11]: /Study/Study [12]: /Games/Games [13]: /Do/Do [14]: /Car/Car [15]: /House/House [16]: /Watch/Watch [17]: /Clothing/Clothing [18]: /Miscellany/Miscellany <!-- vim: filetype=markdown -->
Edit message:
Cancel