unset folder-hook
Ranjan Maitra
mlmaitra at gmx.com
Mon Jul 17 12:02:34 UTC 2023
On Sun Jul16'23 10:03:01PM, Ed Blackman wrote:
> From: Ed Blackman <ed at edgewood.to>
> Date: Sun, 16 Jul 2023 22:03:01 -0400
> To: mutt-users at mutt.org
> Subject: Re: unset folder-hook
>
> On Thu, Jul 13, 2023 at 09:44:30AM -0500, Ranjan Maitra wrote:
> > On Thu Jul13'23 02:10:02PM, Francesco Ariis wrote:
> > > In my .muttrc I have:
> > >
> > > folder-hook sent "set something foobar"
> > > folder-hook !sent "set something something_else"
> > >
> > > maybe you can use it too in your setup?
> >
> > What if I have three sets of folder hooks in addition to the default? Also, can I not just revert the !sent (in your case) to the default, without setting everything else? I wonder if there is be a way to do the hooks only for a specific set of folders and nothing else.
>
> In my .muttrc I have:
>
> # Set $strict_threads in large mailboxes (which are likely to have duplicated subjects)
> folder-hook . set strict_threads=no
> folder-hook =sent set strict_threads=yes
> folder-hook =.archive* set strict_threads=yes
>
> The "." applies to every folder, and sets a default. The last two change the setting for a specific folder, and a set of folders matching a regex.
>
> --
> Ed Blackman
Thanks very much for this, however, I get an error, when I do the following:
folder-hook . 'unset smtp_url'; 'set strict_threads=no'
folder-hook '(mutt|fedora|postfix|fetchmail|openbox)' 'set from =
email at address.com; set smtp_url="something"; set smtp_pass="somethingelse"; set
envelope_from_address="email at address.com"; set use_envelope_from=yes; set from = "email at address.com"; my_hdr Bcc:; set forward_format = "[FW frm %a:%s]";set realname = "Real Name"; set ssl_force_tls = yes; set ssl_starttls = yes'; 'set strict_threads=yes'
When I go to the mutt folder, I get:
Error in /home/email/.muttrc, line 286: set strict_threads=no: unknown command
Error in /home/email/.muttrc, line 288: set strict_threads=yes: unknown command
source: errors in /home/email/.muttrc
Is my syntax incorrect here? Am I missing some other package/mutt helper?
Many thanks,
Ranjan
More information about the Mutt-users
mailing list