Stephen Isard wrote in <23419-1663010880-528...@sneakemail.com>: |On Mon, 12 Sep 2022, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote: |>|s-nail -X 'call update_access_token' -A oauth |>| |>|The initial call to update_access_token uses the refresh token in your |>|~/.s-nail-tokenfile to get an access token that s-nail treats as a |>|password for logging in. The settings of on-main-loop-tick and |> |> Why do you need this initial call? Ah, you directly log into IMAP |> and use that as your base, hmhm, we really deal bad with that. |> Call it from within the account? | |You are right, calling it at the beginning of the account definition |works. I didn't do it that way because I wasn't certain that s-nail |would set the password before attempting the imap login. It makes sense |that the lines in the account definition would get executed in order, |but I wasn't sure.
It will always work in this order, the old account is teared down, the new account macro is evaluated, then if that was successful, the folder is opened. Maybe could also be documented better, especially that on-account-cleanup is called even if the that folder-opening stage is not even reached. Thanks Stephen! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)