Re: Two questions regarding header display

2022-06-04 Thread raf
On Sun, Jun 05, 2022 at 12:06:52AM -0400, Jason Franklin  
wrote:

> Greetings:
> 
> I have two questions regarding header display...
> 
> First, can the pager display header names in bold if the terminal
> supports it?
> 
> Second some senders have weird capitalization of headers. Is it possible
> to display some canonical representation of any given standard header?
> 
> To clarify, if the header is sent as "reply-to", I would like to always
> see "Reply-To" in the pager.
> 
> Thanks!
> 
> -- 
> Jason

Hi, I don't know about the first part, but the second part
could be done if procmail or similar is used for local
delivery, and it passes incoming messages through a filter
to "correct" the headers to your liking. But it might
be a hassle if you aren't already using procmail.

~/.procmailrc:

  :0 fw
  | /home/me/bin/fix-mail-headers-filter

/home/me/bin/fix-mail-headers-filter:

  #!/usr/bin/env perl
  use warnings;
  use strict;
  # Modify headers if needed (e.g. "reply-to:" to "Reply-To:")
  while (<>)
  {
# Skip to the following trivial loop after headers
print, last if /^$/;
# Replace lowercase at start of word before colon with uppercase
s/^([^:]*)\b([a-z])/$1\U$2/ while /^[^:]*\b[a-z]/;
print;
  }
  # Jut print the rest unchanged
  print while (<>);

The above was barely tested. Don't use it without testing it on
lots of existing mail (one message at a time - see formail(1))
until you are sure that it works. And note that it doesn't
convert any uppercase to lowercase, only the other way around.

cheers,
raf



Two questions regarding header display

2022-06-04 Thread Jason Franklin
Greetings:

I have two questions regarding header display...

First, can the pager display header names in bold if the terminal
supports it?

Second some senders have weird capitalization of headers. Is it possible
to display some canonical representation of any given standard header?

To clarify, if the header is sent as "reply-to", I would like to always
see "Reply-To" in the pager.

Thanks!

-- 
Jason


Re: adding an account

2022-06-04 Thread Chris Narkiewicz via Mutt-users
Dnia Sat, Jun 04, 2022 at 01:50:00PM -0400, Albert R. Pyott
napisał(a):

> Hello, I have gmail working on one computer and yahoo on
> another.  Thus, two muttrc files.  What is the best way to set these
> up on one system? I've read that this involves "hooks" and things that
> I don't understand too well.  Is there an easy model to follow?

You can use hooks to run config commands when entering a mailbox. I
don't like this approach for reasons.

I prefer to split my mutt config into individual rc files and source
them in main config. This way, I can split configuration into shared
common config and per-account config and launch mutt for a given
account by pointing it to a specific config file.

Best regards,
Chris Narkiewicz



signature.asc
Description: PGP signature


Re: adding an account

2022-06-04 Thread Francesco Ariis
Hello Albert,

Il 04 giugno 2022 alle 13:50 Albert R. Pyott ha scritto:
> Hello, I have gmail working on one computer and yahoo on another.  Thus, two 
> muttrc files.  What is the best way to set these up on one system?  I've read 
> that this involves "hooks" and things that I don't understand too well.  Is 
> there an easy model to follow?  Many thanks.  Rob 

This is what I do (maildir)

# scaffold
set mbox_type=Maildir
set folder="~/mail"
set mask="!^\\.[^.]"

# mailboxes
mailboxes "+gmail"
mailboxes "+yahoo"

# hooks
set realname="Some N. Ame"
folder-hook gmail "set from=exam...@gmail.com"
folder-hook yahoo "set from=exam...@yahoo.com"

This should get you started!
—F


adding an account

2022-06-04 Thread Albert R. Pyott
Hello, I have gmail working on one computer and yahoo on another.  Thus, two 
muttrc files.  What is the best way to set these up on one system?  I've read 
that this involves "hooks" and things that I don't understand too well.  Is 
there an easy model to follow?  Many thanks.  Rob