Discussion:
Need some better ideas for folder-hooks
David Woodfall
2018-08-10 07:14:16 UTC
Permalink
My ~/Mail is a local maildir mailbox, and I have quite a few
folder-hooks, some to set different 'from' and 'sendmail' to send via
various smtp servers and addresses and some set other properties:

folder-hook .* source ~/.mutt/default
folder-hook =Lists/* source ~/.mutt/listhook
folder-hook =Google source ~/.mutt/google
folder-hook =Yahoo source ~/.mutt/yahoo
folder-hook =Paypal|Sent|Ebay|Trash|Shops|Slackware set sort=date
...
etc.

There are around 12 custom hooks in all. Because I was having
problems, I also added them without the = too to see if would help.

After a while though I find that settings aren't being applied and I
can't seem to find any clues why.

Is it the .* that's messing up the others? They seem to work fine for
a while, even with that.

If there are better ways to do this I'd be glad for any ideas.

-Dave

--

It's now the GNU Emacs of all terminal emulators.
-- Linus Torvalds, regarding the fact that Linux started off as a terminal emulator

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
David Woodfall
2018-08-10 16:43:51 UTC
Permalink
On Friday 10 August 2018 08:14,
Post by David Woodfall
My ~/Mail is a local maildir mailbox, and I have quite a few
folder-hooks, some to set different 'from' and 'sendmail' to send via
folder-hook .* source ~/.mutt/default
folder-hook =Lists/* source ~/.mutt/listhook
folder-hook =Google source ~/.mutt/google
folder-hook =Yahoo source ~/.mutt/yahoo
folder-hook =Paypal|Sent|Ebay|Trash|Shops|Slackware set sort=date
...
etc.
There are around 12 custom hooks in all. Because I was having
problems, I also added them without the = too to see if would help.
After testing a few things it turned out that only 'from' wasn't
being set, but I changed things to use my_hdr and it seems OK so far.

Funnily enough I used to use my_hdr a long time ago but switched to
'set from'. Not sure why now, but looking at the man page it looks
like it can't be set on the fly like my_hdr.

-Dave

--

All language designers are arrogant. Goes with the territory...
-- Larry Wall

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Continue reading on narkive:
Loading...