Synchronize after sending a message

12 views
Skip to first unread message

ma.wie...@gmail.com

unread,
Apr 7, 2018, 10:46:35 AM4/7/18
to mu-discuss
Hi,

I'm trying to synchronize my maildir right after mu4e touched a message on disk (such as after sending, moving, deleting or saving a draft) by calling mbsync. Offlineimap can watch for changes on disk (I'm aware of that), however switching is not really an option for me. I checked the manual and the hooks and could not find something suitable, maybe I have overseen something obvious.

Has anyone implemented something similar?

Greetings,
Manuel

Arne Köhn

unread,
Apr 7, 2018, 11:40:32 AM4/7/18
to mu-di...@googlegroups.com

ma.wie...@gmail.com writes:

> I'm trying to synchronize my maildir right after mu4e touched a message on
> disk (such as after sending, moving, deleting or saving a draft) by calling
> mbsync.

Depending on your OS, you can use inotifywait from the inotify-tools package:

while inotifywait -e modify /path/to/maildir; do
mbsync
done

(or similar, haven’t used it in years)

ma.wie...@gmail.com

unread,
Apr 7, 2018, 12:18:00 PM4/7/18
to mu-discuss
Thanks for your reply. inotify is indeed a way to do it. However, I'm looking for a more integrated solution, which can give feedback (error messages e.g.) directly in emacs.
Reply all
Reply to author
Forward
0 new messages