Mutt

Pendahuluan

Mutt adalah command line email client yang andal. Klien ini mendukung format mbox dan Maildir. Protokol yang didukung meliputi POP3 dan IMAP. Awalnya dirancang sebagai Agen Pengguna Email (MUA) dan sebelumnya mengandalkan Sendmail, tetapi dukungan untuk pengiriman email akhirnya ditambahkan.

Fitur

  • Dukungan Full MIME, integrasi penuh PGP/GPG dan S/MIME.

  • Kemampuan penilaian pesan dan threading.

  • Mutt mengandalkan alat eksternal untuk menyusun dan memfilter pesan.

  • Dukungan untuk threading email

  • Penyusunan pesan dilakukan menggunakan editor teks eksternal pilihan pengguna.

  • Makro Keyboard untuk menjalankan fungsi kompleks

  • Fungsi yang dapat diperluas menggunakan patch

Instalasi

$ sudo apt install mutt

Konfigurasi

Berkas konfigurasi ~/.muttrc akan digunakan untuk setiap pengguna. Jika tidak ada, maka berkas konfigurasi global /etc/Muttrc akan digunakan.

~$ touch ~/.muttrc
~$ sudo chmod 600 ~/.muttrc
~$ nano ~/.muttrc

###
# User info
###

set realname = "alice"
set from = "alice.sub@email.com"
set use_from = no
set envelope_from ="yes"

mailboxes imap://mail.com
set folder="imap://mail.com/INBOX"
set imap_user="alice" #your IMAP user name or login
set imap_pass="mysecret" #your IMAP password


# If not set in ~/.bashrc:
set spoolfile = /var/mail/alice

Mengaktifkan GMAIL

An "SASL authentication failed" error when using Mutt with Gmail typically occurs because you are no longer allowed to use your primary password for applications like Mutt. Instead, you must use a dedicated App Password generated through your Google Account settings. Other issues like incorrect server settings or disabled IMAP can also cause the error.

Step 1: Generate a Gmail App Password

  1. Enable 2-Step Verification: If you have not already, enable 2-Step Verification for your Google account. An App Password can only be created once this is active.

  2. Go to App Passwords: - Navigate to your Google Account. You may be asked to sign in. - In the search bar, type "App Passwords" or navigate to Security and look for the App Passwords option under "How you sign in to Google".

  3. Generate a new password: - From the "Select app" dropdown, choose Mail. - From the "Select device" dropdown, choose your operating system (e.g., "Linux" or "Mac"). You can also select "Other" and type "Mutt". - Click Generate. A 16-character password will be displayed.

  4. Copy the password: Copy the password immediately and save it somewhere secure. You will not be able to view it again.

Step 2: Enable IMAP in Gmail

  1. Log in to your Gmail account on a web browser.

  2. Click the Settings cog in the top-right corner, then click See all settings.

  3. Go to the Forwarding and POP/IMAP tab.

  4. Under the "IMAP access" section, ensure Enable IMAP is selected.

  5. Click Save Changes at the bottom

Step 3: Configure Mutt

Open or create your Mutt configuration file (typically ~/.muttrc or ~/.mutt/muttrc) and add or update the following lines. Replace your.email@gmail.com with your Gmail address and app-password-here with the 16-character App Password you generated

# IMAP settings
set imap_user = "your.email@gmail.com"
set imap_pass = "app-password-here"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"

# SMTP settings
set smtp_url = "smtps://your.email@smtp.gmail.com:465/"
set smtp_pass = "app-password-here"
set from = "your.email@gmail.com"
set realname = "Your Name"

# Authentication settings
set smtp_authenticators="login"
set ssl_starttls = yes
set ssl_force_tls = yes

# Folders for synchronization (optional)
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"

Step 5: Test and troubleshoot

After saving your muttrc file, run Mutt. If you still have problems, double-check that your settings match the examples above, and that you have enabled 2-Step Verification and IMAP correctly.

Referensi