-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for exim SMTP (and also refresh token expiry) #16
Comments
Yes, I think that would be useful! I'm not sure how refresh token expiry works in practice but renewing the token every so often is probably a good idea in any case. |
I have now uploaded my project to github: It is designed to be used alongside M365-IMAP although it can be used independently. The README.md file gives more detail. |
s/github/gitlab/g !! |
I just encountered refresh token expiry in my .offlinimaprc file for the first time. Fortunately I had a current refresh token cached in oauth2ForExim, so it was trivial to copy for offlineimaprc. offlineimap ddin't give a very clear message. |
Ideally, the code should |
On Sat, Apr 22, 2023 at 10:39:19AM -0700, Chris Coleman wrote:
Ideally, the code should `try` to detect `xoauth2` login failure, and `catch` when the reason is expired token, renew it, and try again!
Indeed, but I don't think that is possible because the failure happens
in exim and there is no channnel back into the script. Well maybe there
is a way using some sort of hook, but I have not explored that.
It seems that someone is trying to extend exim to handle oauth2 directly,
so it would be much easier there. If they succeed, my code would become
redundant.
ael
|
Please ignore my previous comment :-) I replied to the email copy without the context, and now realise that it was about M365-IMAP and not about oauthForExim. |
Hello again,
I use exim for my outgoing email, and it does not (yet?) support OAUTH natively.
I have now got it working with pretty much a 5 line gawk script, although there is a little more to it than that.
I started with exim4-oauth2 but that didn't work, and I don't understand how it could ever have worked, but adapted that approach for use with M365-IMAP.
You give instructions for msmtp. Would you like me to provide the instructions for exim as well?
In the course of getting exim to work with MS oauth, I came across a a statement from MS that refresh tokens expire after 90 days. You don't seem to allow for that: have I missed something?
I am planning to arrange to renew the refresh token every month or two in my gawk script, but
haven't done that yet.
The text was updated successfully, but these errors were encountered: