OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

export env. variables when running account hooks #657

Closed lenormf closed 4 years ago

lenormf commented 4 years ago

This PR

Additional information

I've tested these modifications with the following:

[Account github]
postsynchook = ~/.config/offlineimap/synchook.sh
#!/bin/sh

cd ~/mail

notmuch new

if [ "${OIMAP_ACCOUNT_NAME}" = "github" ] \
   && [ "${OIMAP_HOOK_NAME}" = "postsynchook" ]; then
    notmuch tag +github_notification -- from:notifications@github.com
fi
nicolas33 commented 4 years ago

Good commit quality. Applied into the 'next' branch. Thank you!