How do you sync your mail constantly?
William Casarin
jb55 at jb55.com
Sat Nov 3 00:23:27 PDT 2018
Vika Shleina <kisik21 at fireburn.ru> writes:
> And to maybe think of alternative solution, I ask you - what do you use
> to seamlessly sync your mail?
I use a script[1] that connects to my imap server. New mail comes into
my sieve-filtered inbox[2] which then triggers the imap-notify[1] script
on my local machine. This script runs muchsync, which in turn runs
notmuch new on the remote machine, and then syncs tags between the local
machine and the server.
Once muchsync finishes I trigger a notification[4] with notify-send,
which pops up a message on twmnd.
To make this rube goldberg device work I have a bunch of systemd
services[5] defined in NixOS that manages everything. It's pretty hacky
and can get stuck, so I have a python script that restarts imap-notifier
when I wake from sleep when I'm on my laptop.
I should probably get around to turning this into a single program that
works well, but here we are.
My setup with muchsync assumes you run your own mailserver. If you're
using something like gmail you can scrap the muchsync step and just use
an imap-notifier-like script to run mbsync and the notmuch-new.
Cheers,
Will
[1] https://github.com/jb55/imap-notify
[2] I'm not happy with the setup, I would prefer to not have to use
sieve and use tagging directly. but for now it allows me to read my
mail on my phone.
[3] http://www.muchsync.org/
[4] Which I have off most of the time, notifications are terrible. I
toggle them on/off with cmdtree: https://git.sr.ht/~jb55/cmdtree
[5] https://github.com/jb55/nix-files/blob/monad/misc/imap-notifier/default.nix
More information about the notmuch
mailing list