Communicate syncmode to synchooks

This patch sets the environment variable OFFLINEIMAPSYNCMODE to either
full, quick or idle depending on the context of the pre- and
postsynchook.

Adding the context as an argument was considered but this would break
existing configurations and it makes calling a program directly more
cumbersome. Some programs (e.g. imapfilter) may not know what to do with
this extra argument.

Signed-off-by: Mart Lubbers <mart@martlubbers.net>
This commit is contained in:
Mart Lubbers
2021-09-07 09:38:10 +02:00
parent 4ca9c75c6f
commit 7748de52fb
3 changed files with 23 additions and 17 deletions

View File

@ -320,6 +320,9 @@ remoterepository = RemoteExample
#
# The pre sync script has to complete before a sync to the account will start.
#
# The environment variable OFFLINEIMAPSYNCMODE will be set to either full,
# quick or idle to communicate the syncmode to the external command.
#
#presynchook = imapfilter -c someotherconfig.lua
#postsynchook = notifysync.sh