Χάρης Καραχριστιανίδης wrote in
 <20230218125916.ofb__%haris...@otenet.gr>:
 |Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |> Χάρης Καραχριστιανίδης wrote in
 |>  <20230217184829.j1piy%haris...@otenet.gr>:
 |>|Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |>|> Χάρης Καραχριστιανίδης wrote in
 |>|>  <20230217133009.z4nty%haris...@otenet.gr>:
 |>|>|Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |>|>|> Χάρης Καραχριστιανίδης wrote in
 |>|>|>  <20230216081131.myqru%haris...@otenet.gr>:
 |>|>|>|Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |>|>|>|> Χάρης Καραχριστιανίδης wrote in
 ...
 |Here is my .mailrc after following your suggestions (I think). Much \
 |smaller and cleaner! Could some options go out of the 2 accounts and \
 |put them before the accounts? Like set smtp-use-starttls or set imap-kee\
 |palive=240
 |   set imap-cache=~/.mail/.imap_cache ?

Sure.  Like you do with netrc-lookup.  (Which i only set
per-account).

 |set v15-compat=y
 |set netrc-lookup
 |
 |set mime-alternative-favour-rich
 |set pipe-text/html='?! lynx -stdin -force_html'

And you do use the built-in HTML filter for simple overview, that
only for "mimeview".  Ok.  You could then move this to your
~/.mailcap file, no?  You could remove the duplicate "mupdf" from
it and instead add a "text/html; lynx %s; nametemplate=%s.html".

 |colour 256 view-header ft=bold,fg=111 subject,from
 |colour 256 view-partinfo fg=2
 |colour 256 view-msginfo fg=1
 |#colour 256 sum-dotmark   fg=204,ft=bold dot
 |#colour 256 sum-header    fg=39 older
 |#colour 256 sum-header    fg=39,ft=reverse dot
 |#colour 256 sum-header    fg=45
 |colour 256 sum-thread    fg=39,ft=bold,ft=reverse dot
 |colour 256 sum-thread    fg=172
 |colour 256 view-from_    fg=142
 |#colour 256 view-header   fg=214,ft=bold from,subject
 |colour 256 view-header   fg=214 author,cc,sender,to
 |colour 256 view-header   fg=217 reply-to,mail-followup-to,user-agent
 |colour 256 view-header   fg=219
 |#colour 256 view-msginfo  fg=76,ft=bold
 |#colour 256 view-partinfo fg=76
 |#colour 256 mle-position  fg=203,ft=reverse
 |#colour 256 mle-prompt    fg=203
 |#colour 256 mle-error     bg=124
 |
 |
 |
 |account account1 {
 |   set smtp-use-starttls

Yes make it global, v14.10 will bring smtp-config instead and TLS
is implied (must be turned off explicitly).

 |   set mta=smtp://mailgate.xxxxxx.xx
 |   set from="xxxxx xxxxxxxxxxx <xxxxx...@xxxxxx.xx>"
 |   set record=@Sent
 |   set inbox=imaps://imap.xxxxxx.xx:993
 |   set imap-keepalive=240
 |   set imap-cache=~/.mail/.imap_cache
 |   commandalias oi 'account account1'
 |   commandalias os 'fi @Sent'

I for example have

  bind default :kf5 Fi+sent

so that pressing F5 goes to the sent folder, readonly.  (I usually
do not want to modify the sent folder.)
Unfortunately commandalias, alias, shortcut, bind, colours etc etc
are all not yet covered by "local"(opts), so that you really have
to overwrite the things again when you switch off.
I often use the on-account-cleanup hook for that, so that i am
sure all account-specifics are gone in the "global namespace"
/ other accounts, but i look forward to get that implemented,
finally.  (Not v14.10 most likely, though.  Unfortunately.)

  define oac {
    uncommandalias oi os mi
    unshortcut imap
  }

Local "define"s (aka in other macros) is also not yet supported.

 |   commandalias mi 'account account2'

      set on-account-cleanup=oac
 |}
 |
 |account account2 {
 |   set smtp-use-starttls
 |   set mta=smtp://mail.xxxxxxxxx.xx
 |   set from="xxxxx xxxxxxxxxxxν <x...@xxxxx.xx>"
 |   set message-inject-tail=$'\n----------- \nXX XXXXXXXX \nXXXXX XXXXXXXXXX\
 |   XXXXXX \nXXXXXXXXXXXX XX XXXXXX XXX XXXXXXXXXXX XXX XXXXXXXXXXXXXXXXXXXX\
 |   '
 |   set record=@Sent
 |   set inbox=imaps://mail.xxxxxxxxxx.xx:993
 |   set imap-keepalive=240
 |   set imap--cache=~/.mail/.imap_cache

Typo?  Note that the imap-cache will definetely vanish not to come
back.  There will be a header cache, aka "mail summary files", as
shown by Jamie Zawinski for Netscape, a quarter of a century ago.
Yes, connect / disconnect will vanish, you switch on and off
a mailbox, and after connection breaks reconnection will be
automatic.  (The latter maybe already with v14.10, if i get a go.)

 |   shortcut imap imaps://mail.xxxxxxxxxxxx.xx:993
 |   commandalias mi 'account account2'
 |   commandalias ms 'fi @Sent'
 |   commandalias oi 'account account1'
 |}
 |
 |alias x1 xxxxx...@xxxxxx.xx
 |alias dk zzzzzz...@zzzzz.zz

Well it looks quite ok i would say.

 --End of <20230218125916.ofb__%haris...@otenet.gr>

Ciao, and a nice weekend i wish.

--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)

Reply via email to