Integrate External Tools#
Prerequisites#
Install the external tool you want to use.
Confirm NeoMutt is working with a basic configuration.
Extracting URLs with urlview / urlscan#
Install urlview or urlscan.
Add a macro to pipe the current message to the tool:
macro index \cb "<pipe-message>urlview<Enter>" "Open URLs with urlview"
macro pager \cb "<pipe-message>urlview<Enter>" "Open URLs with urlview"
Open a message with URLs and press Ctrl-B.
Expected result: a list of URLs appears and you can open one in your browser.
References: urlview man page and urlscan documentation.
Contact Management with abook or khard#
Configure your address source.
Set
query_commandto the external tool:
set query_command = "abook --mutt-query %s"
Use Q in the index menu or Ctrl-T at an address prompt to query.
Expected result: the query menu shows matches from your address book.
Sending Mail with msmtp#
Install and configure msmtp.
Tell NeoMutt to use it as the sendmail backend:
set sendmail = "msmtp"
Send a test message.
Expected result: mail is delivered by msmtp using its own configuration.
References: msmtp documentation.
Offline IMAP with offlineimap / mbsync#
Configure offlineimap or mbsync (isync) to sync your IMAP account to a local Maildir.
Point NeoMutt at the local folder:
set folder = "~/Mail"
set spoolfile = "+INBOX"
Run your sync tool, then open the mailbox in NeoMutt.
Expected result: NeoMutt reads from the local Maildir while your sync tool keeps it updated.
References: offlineimap and isync documentation.
Full-Text Search with notmuch#
Install and configure notmuch.
Follow the Notmuch setup steps in NeoMutt.
See How to Use Notmuch.
Rendering HTML Email with w3m / lynx / elinks#
Install a text-mode browser.
Add a mailcap entry to render HTML:
text/html; lynx -dump %s; copiousoutput
View an HTML message in NeoMutt.
Expected result: HTML is rendered as readable text in the pager.
References: mailcap documentation and the w3m, lynx, and elinks projects.
Calendar Integration (khal, calcurse)#
Save a calendar invite (ICS file) from the attachment menu.
Open or import it with your calendar tool:
khal: https://khal.readthedocs.io/
calcurse: https://calcurse.org/
Expected result: the invite appears in your calendar tool.
Custom Processing with pipe-message#
Create a script or command to process messages.
Bind a key to pipe the current message:
macro index,pager ,p "<pipe-message>~/bin/mail-filter<Enter>" "Pipe message to filter"
Press ,p while viewing a message.
Expected result: the message is passed to your command for processing.