offlineimap3
offlineimap3 copied to clipboard
Account callhook does not support environment variables
The callhook method does not support exporting environment variables to be consumed in hooks as it did in the previous version. (https://github.com/OfflineIMAP/offlineimap/blob/7531ac4640aff8477b0893c55c99c9fe4a9bbcfc/offlineimap/accounts.py#L446)
This prevents defining a single hook to be used across multiple accounts using the OIMAP_ACCOUNT_NAME variable in the hook. (https://github.com/OfflineIMAP/offlineimap/blob/7531ac4640aff8477b0893c55c99c9fe4a9bbcfc/offlineimap/accounts.py#L337)
The current callbook method is defined without the env argument. https://github.com/OfflineIMAP/offlineimap3/blob/1e7ef9e7e6952f5d29ef0f5c25fd062798de55f3/offlineimap/accounts.py#L449
Hello @kriation
Thanks for your issue. The patch is something like this?:
https://git.2li.ch/PIM/offlineimap/commit/da69fd81edac89a0eabf13ffda415dd8e22e4d4c?style=split&whitespace=
Regards, kix
@thekix, looks like that will resolve the issue. I'm happy to help in bringing the linked patch to this repository if requested.
@kriation
yes please! Try to apply the patch to the current version and if all is fine, please, create a pull request
Thanks a lot, Best regards, kix