rss logo

Mutt e-mail client

Mutt logo


  • Mutt : 2.2.9

How To

Exclude his own address when using reply to all :

  • Add unset metoo inside configuration file ~/.muttrc :
user@host:~$ echo "unset metoo" >> ~/.muttrc

Enable IDLE :

  • Add set imap_idle=yes inside configuration file ~/.muttrc :
user@host:~$ echo "set imap_idle=yes" >> ~/.muttrc

Read receipts :

  • Add the filed : Disposition-Notification-To: <myemailaddress@domain> inside the mail header, (press E to edit mail with headers).

Solve the impossible to save the SSL certificate error :

  • Add set ssl_starttls="yes" and set certificate_file="~/.mutt_certificates" inside the configuration file ~/.muttrc :
user@host:~$ echo -e "set imap_idle=yes\nset certificate_file="~/.mutt_certificates"" >> ~/.muttrc

Random signature :

Each day

  • Set signature in .muttrc file
set signature="~/.signatures"
  • Add your signatures inside .signatures file
  • Set a cron file : /etc/cron.d/random_signature

Put every signatures in a .signatures file and each hour, the .signature file will be populated by a random signature

00 * * * * user sort -R /home/user/.signatures | head -n 1 | fold -w 72 -s > /home/user/.signature

Each mail

  • Set signture in .muttrc file
set signature="sort -R /home/user/.signatures | head -n 1 | fold -w 72 -s|"

Some commands

Mail Access
y Print mailboxes
c Change folder : allow to move to another folder
b Bounce-message : re-send mail to another recipient (with the original header)
Ctrl+t Change message type : ex : text/html, text/plain

Organize mails

  • Create a folder :
    • c (change folder)
    • ? (list)
    • Shift+c (create-mailbox)
  • Delete a folder :
    • c (change folder)
    • ? (list)
    • d (delete-mailbox)
  • Move a mail to another directory :
    • s (move)
    • Shift+c (copy)
  • Move mails to another directory :
    • t (flag mails)
    • ; (to point out to mutt that we will work with flagged mails)
    • s (move)
  • IMAP : subscribde or unsubscribde a folder :
    • c (change folder)
    • ? (lister folders)
    • T (list/hide unsubscribded folders)
    • u (unsubscribded)
    • s (subscribded)

In IMAP environment replace ~ by = symbol to enhance search performance.

  • Print only mails from toto@domaine.local:
    • l (Limit mails)
    • ~f toto@domaine.local (from toto@domaine.local)
  • Print only mails from a range of dates:
    • l (Limit mails)
    • ~d 01/01/2018-31/12/2018 (from 01/01/2018 to 31/12/2018)
  • Print only mails from a range of dates and from two differents users:
    • l (Limit mails)
    • (~f toto|~f titi) ~d 01/01/2018-31/12/2018 (from users toto or titi and between 2018/01/01 to 2018-12-31)
  • Print only mails from specific Subject field:
    • l (Limit mails)
    • ~s "elarge your P"
  • Print all mails:
    • l (Limit mails)
    • all
  • Search EXPR in the message body:
    • / (Search)
    • ~b EXPR
  • Search EXPR in the whole message:
    • / (Search)
    • ~B EXPR

Configuration File Example

  • ~/.muttrc file :
# configuration de base
set realname = "Firstname LASTNAME"
set header_cache =~/.mutt/cache/headers
#set message_cachedir =~/.mutt/cache/bodies
set certificate_file="~/.mutt_certificates"

# imap configuration
set folder="imaps://"
set spoolfile="+INBOX"
set record="+INBOX.Sent"
set imap_user = ""
set imap_pass = "IMAP_password"
set imap_passive="no"
set imap_check_subscribed="yes"
set imap_list_subscribed="yes"
set ssl_starttls=yes
# Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
set imap_check_subscribed
# Reduce polling frequency to a sane level
set mail_check=60

# configuration SMTP
set smtp_url = "smtps://" #with as our SMTP user login
set smtp_pass = "SMTP_password"
set from = ""
set use_envelope_from=yes # Pour que postfix ou sendmail ne change pas votre from

#address book
#set alias_file = ~/.mutt/adresses
#source ~/.mutt/adresses

set implicit_autoview 
set editor=/usr/bin/vim
auto_view text/html application/x-pgp-message 
set mailcap_path="~/.mailcap" 
set mailcap_sanitize=yes
unset metoo   # supprime l'adresse de l'expéditeur lors d'une réponse 
#set signature="~/.mutt/signature"

#activer l'idle :
set imap_idle=no

#disable SSL3
set ssl_use_sslv3=no
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address