Under Development
stars

Integrate External Tools#

Prerequisites#

  1. Install the external tool you want to use.

  2. Confirm NeoMutt is working with a basic configuration.

Extracting URLs with urlview / urlscan#

  1. Install urlview or urlscan.

  2. 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"
  1. 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#

  1. Configure your address source.

  2. Set query_command to the external tool:

set query_command = "abook --mutt-query %s"
  1. 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.

See How to Set Up Address Book Integration.

Sending Mail with msmtp#

  1. Install and configure msmtp.

  2. Tell NeoMutt to use it as the sendmail backend:

set sendmail = "msmtp"
  1. Send a test message.

Expected result: mail is delivered by msmtp using its own configuration.

References: msmtp documentation.

Offline IMAP with offlineimap / mbsync#

  1. Configure offlineimap or mbsync (isync) to sync your IMAP account to a local Maildir.

  2. Point NeoMutt at the local folder:

set folder = "~/Mail"
set spoolfile = "+INBOX"
  1. 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#

  1. Install and configure notmuch.

  2. Follow the Notmuch setup steps in NeoMutt.

See How to Use Notmuch.

Calendar Integration (khal, calcurse)#

  1. Save a calendar invite (ICS file) from the attachment menu.

  2. 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#

  1. Create a script or command to process messages.

  2. Bind a key to pipe the current message:

macro index,pager ,p "<pipe-message>~/bin/mail-filter<Enter>" "Pipe message to filter"
  1. Press ,p while viewing a message.

Expected result: the message is passed to your command for processing.