mutt (well, neomutt these days) because I can edit emails with vim, and I have coming up on 20 years of customization in it - it "just works" and I don't have to think, the interactions with it are pure muscle memory at this point.
Turns out you can!
The neomutt manpage (https://neomutt.org/man/neomutt) shows the option -a
. So you can pick the files you need within nnn
and attach them to neomutt.
This is what I tried (in fish shell) to combine ls
with the nnn picker mode:
$ ls -l (nnn -p -) -rw-rw-r-- 1 vaio vaio 14722 Jul 10 07:24 /home/vaio/GitHub/nnn/CHANGELOG -rw-rw-r-- 1 vaio vaio 1472 Jul 7 21:49 /home/vaio/GitHub/nnn/LICENSE -rw-rw-r-- 1 vaio vaio 1697 Jul 10 07:24 /home/vaio/GitHub/nnn/Makefile
Honestly I was surprised how many emails that use HTML are perfectly readable with neomutt. They'll generally either also provide a plaintext version, or I can autoview them in neomutt via w3m for HTML rendering. Sure, I can't see images, but if I need to I can easily open them in sxiv. And there's a way to get w3m to draw images too, I just haven't tried that (or needed it to be honest) in neomutt. All this to say I think it's worth a try if you believe you'd benefit from using neomutt.
Are you sure you're not solving the XY problem? There are lots of far easier and robust ways to solve this. I'll list two of them:
"s4yy
to put a 4 line signature into s register. Then paste it using "sp
when sending an email.Also be warned that many mailing lists forbids putting signature on top so make sure you abide by their rules.
Très cool mutt! Je suis dessus depuis 2-3 ans pour mes boites pro et persos.
Par contre y'a forcément un petit temps d'adaptation par rapport à un client 'mail' normal. Côté HTML, ça m'a jamais posé énormément de soucis, y'a beaucoup de client mails qui t'envoient le contenu en version texte à côté. Je te conseille d'ailleurs de compil' neomutt[1] qui est un peu plus complet que le mutt originel (Avec des sidebars étoo!)
> It is hard to infer causality from one incident.
I agree. I just found this attempt suspicious as it happened right after I started using mutt, and some days later I found that an update was submited fixing some security vulnerability.
> However (Neo)Mutt would probably be inherently more secure than any email client that can parse HTML, eg. Thunderbird.
Regarding this, I am currently using a macro to open the html version of some emails in the browser. Does this compromise security?
I think you're looking for the use_from
option
set use_from=yes
which (if I understand it correctly) will generate the From:
header based on the email to which you're replying.
https://neomutt.org/guide/reference.html#3-441-%C2%A0use_from
edit: add link to reference docs
I can't say I've ever had a problem with it. When I reply or forward a message in mutt, it includes the previous message, each line prefixed with >
which in markdown is a blockquote. These can be nested if necessary if there is a long chain of replies / forwards.
This works very well. You could configure it with the indent_string option but it has always worked fine for me.
If I need to quote part of a message, I just prefix it manually with >
.
I hope that helps
I can usually find what I need with the Limit
opion (L
by default) which can narrow down results to a keyword.
But a lot of people use NotMuch. Haven't set it up myself, curious to see if its useful...
Why won't neomutt recognise some (less common) config variables?
I use neomutt and I love it. It's great. I've been really fine tuning my setup, and I wanted to set a custom attachments downloads folder (like ~/Attachments
or something).
So I put set attach_save_dir = ~/Attachments
in my neomuttrc, treating it just like any other config variable I use (lots). When I launch neomutt it says it's an unknown variable.
(the variable is listed here and here)
What am I doing wrong?!
$ man vim | grep -A 4 -e "-c {command}"
{command} will be executed after the first file has been
read. {command} is interpreted as an Ex command. If the
{command} contains spaces it must be enclosed in double
quotes (this depends on the shell that is used). Example:
(example omitted)
You have failed to quote-enclose the phrase you pass to vim's -c
option, so it gets a source
command without a filename, throws the error you're seeing, then receives the file you are trying to source as a file to edit. Since you haven't included a %s
then according to neomutt's documentation it will append a space and the filename – so before you fix this problem, you will probably observe that if you issue :n
once vim has started editing the config file you meant to source, you will find yourself editing the file that neomutt actually intended for you to edit.
The fix should be: change your neomuttrc line to:
set editor = "vim -c \"source ~/.config/neomutt/config/vim/vimConfig\""
In general when working with shell stuff be very wary of spaces and proper escaping. Treating those things with proper defensive caution will preemptively solve probably 90% of common shell issues. It's also the reason you should never do for file in $(ls $some_pattern) ; do [...] ; done
– because filenames can have spaces and your shell's iteration over ls
output isn't smart enough to handle that. (Usually it is smart enough if you use your shell's built-in filename expansion, such as for file in ./some/pattern* ; do [...] ; done
, and find
and xargs
both have options to use null-character-separated filenames for this exact reason as well.)
TL;DR: quoting and spaces! :)
It's pretty easy if you have the bridge setup and running already. You can follow any guide on the internet for mutt with imap/pop3 and it will work. I'm currently using protonmail and mutt. Works great. The Archwiki is a good place to start even if you don't run Arch. Also, take a look at Neomutt its backwards compatible with regular mutt and has most of the top patches built in. Good luck! You wont want to ever go back to anything else.
I'll be that annoying person and say that this is exactly why some cool auto-config wizard is more harmful than good in a lot of cases :)
For this purpose I'm using neomutts virtual mailboxes (which uses notmuch behind the scenes): https://neomutt.org/feature/notmuch
notmuch essentially is just a mail tagger/indexer, and you can then generate "virtual" mailboxes based on whatever search criteria you want.
If you index all your mail in this system and then just have a query of mail with the "+inbox" tag, then that will show you what you want.
There's a fair bit of set up and reading to do, but I think it's worth it in the long run if you're planning on using neomutt for the forseeable future.
Neomutt integrates with notmuch by a concept of virtual mailboxes. I recommend that you read their wiki about it: https://neomutt.org/feature/notmuch. There's also example neomuttrc which was very helpful for me.
For example, to create a query you have to bind the following command:
bind index,pager \ vfolder-from-query
Even when you use isync (or offlineimap) to sync your remote mail folders to your local disk, caching improves the performance of mutt - especially for large mailboxes. For working directly on the remote server, using mutt's cache is highly recommended. If your mail server is in the intranet of your organisation or company, then the speed when opening the mailbox without caching might still be acceptable - but when working with a slow connection, it becomes too slow for large mailboxes. Caching also kicks in when filtering / searching the mailboxes in mutt.
Note that there are different options with respect to the database backend that mutt uses for the cache (in the neomutt variant). These also have different perfomance metrics, although they will only marginally affect you in practice with mailboxes ~10000 mails - but if your mailboxes are significantly larger then you may experiment a bit.
More information on caching is also found in the neomutt manual:
You need to check-stats
in your hook, like I set it up here
See the documentation for <code>&lt;check-stats&gt;</code>. You might as well be interested in the $mail_check_stats option too.