> Date: Wed, 25 May 2022 16:47:46 +0200 > From: Steffen Nurpmeso <stef...@sdaoden.eu> > To: josef.ju...@gmail.com > Subject: Re: Help with my .mailrc Hello Josef. War das nicht auch Deutsch?? josef.ju...@gmail.com wrote in <628d9b6b.IF8q613EtFruF4ZC%jurek@computer-room01>: |I wonder if I can trouble you with a |request for help off of the list, before |I take this topic to the list again. Always a pleasure. |I am working on migrating from |"heirloom mailx 12.5" to "s-nail 14.9.23" You said that in 2014 already. |and I am having trouble configuring my |.mailrc file. | |The file I have been using since 2014 |for "heirloom mailx" is: | |> set imap-cache=~/MMAAIILL |> set folder=imaps://josef.ju...@imap.gmail.com |> |> set smtp-use-starttls |> set ssl-verify=ignore |> set imap=imap.gmail.com:993 |> set smtp=smtp.gmail.com:587 |> set smtp-auth-user=josef.ju...@gmail.com |> |> |> set editheaders=1 |> set VISUAL=vim |> set crt 22 | |though this file gives me a number of warnings |when using "s-nail 14.9.23" I wonder a bit why it has to be .23 not .24? #?0|kent:nail.git$ MAILRC=/tmp/t.rc mailx -R:u mailx: Warning: variable superseded or obsoleted: ssl-verify -> tls-verify I did change all ssl- to tls- because, you know, some time in the future people will no longer know what SSL was. A bit unfortunate, but compatibility will remain until v15, and this is Christmas 2023 at best. mailx: Warning: variable superseded or obsoleted: smtp mailx: Warning: variable superseded or obsoleted: smtp-auth-user mailx: Variable is read-only: 22 no = in between crt and 22. mailx: Obsoletion warning: no more expansion of *folder* in "%": please set *inbox* mailx: Obsoletion warning: Use of old-style credentials, which will vanish in v15! mailx: Please read the manual section "On URL syntax and credential lookup" IMAP requires a password: ^C^C^C^C^C ^Cmailx: Interrupted It hangs a bit. With -v you would also have seen mailx: Ignoring value of boolean variable: editheaders: 1 ..And i am afraid with v14.9.10 we already force some changes again. Sorry for this. In 2014 we came up with |> account gmail { |> set v15-compat |> set ssl-verify=strict ssl-method=tls1.2 |> set smtp-use-starttls smtp-auth=plain \ |> smtp=josef.jurek%40gmail....@smtp.gmail.com:587 |>} |> account gmail So not that much is to be changed, unfortunately a bit, hm. set v15-compat=y #set want-oauth ^ uncomment this for oauth account gmail { set hostname=gmail.com set user=josef.jurek set inbox=imaps://imap.gmail.com set mta=smtps://smtp.gmail.com:465 if -N want-oauth set smtp-auth=oauthbearer set on-main-loop-tick=o-m-l-t on-compose-enter=o-c-e else set password=PASSWORD ^ set real password (or read manual, "On URL syntax and credential lookup") endif set tls-config-pairs=MinProtocol=TLSv1.3 set tls-verify=strict set crt=22 set editheaders set folder=$inbox set imap-cache=~/MMAAIILL set VISUAL=vim } if -N want-oauth define o-m-l-t { xcall update_access_token } define o-c-e { xcall update_access_token } set access_token_=0 define update_access_token { local set i epoch_sec epoch_nsec vput vexpr i epoch eval set $i # set epoch_sec/_nsec of vexpr epoch vput vexpr i + $access_token_ 2100 if $epoch_sec -ge $i vput ! password python fetchmail-oauth2.py \ ^ this assumes fetchmail-oauth2.py in the path.o -c PATH-TO-ITS-RC-FILE &&\ cat PATH-TO-REFRESH_FILE ^ as posted on the ML vput csop password trim "$password" if -n "$verbose" echo password is <$password> endif set access_token_=$epoch_sec endif } ^ Granted i have not tested this yet, only adjusted the example from the manual to work with fetchmail-oauth2.py. endif account gmail |Can you perhaps supply me with a template .mailrc |that will work with the current version of s-nail? I think that should work with .23, but it should really work with .24. |>From there, perhaps I can then try to get |this .mailrc file to work with xoauth2 |authentication, in time for Google's May 30 deadline. You need to create the client-id etc yourself, as shown in the manual and better in the fetchmail-oauth posted on the ML. |Thank you very much for any help you are able |to offer! | |Josef. | |P.S. | |Is there any security risk to posting my |.mailrc to the list? (Removing any passwords, of course). | |I would not think so, but I thought I would |check with you. Especially not if you remove ssl-verify=ignore. |Thanks again! Ciao. I would forward all this to the list... --End of <628d9b6b.IF8q613EtFruF4ZC%jurek@computer-room01> --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)