mutt als eMail-Client

Mutt ist ein eMail-Client rein auf Konsolenbasis, also ohne grafische Benutzeroberfäche (GUI), dadurch aber sehr ressourcenschonend – und somit wie gemacht für ein Netbook wie das Samsung N150.

Die Installation unter Lubuntu 14.04 läuft gewohnt einfach:

$ sudo apt-get install mutt

Mutt setzt einen MTA (Mail Transfer Agent) zwingend voraus, Standardeinstellung ist postfix. Doch der Konfigurationsaufwand erschien unverhätnismäßig, sodass ich dieses Paket zwar mit installierte, die Konfigurationsroutine allerdings abbrach. Stattdessen installierte ich anschließend per

$ sudo apt-get install ssmtp

mit sSMTP einen einfachen SMTP-Server, um eMails vom Rechner – bspw. auch Meldungen von Cron – zu senden. Anschließend kann die Datei /etc/ssmtp/ssmtp.conf angepasst werden (hier mit Zugriff auf ein Postfach bei Hetzner):

# 
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postfach@ibse-fehse.de

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail.your-server.de:465
AuthUser=postfach@ibse-fehse.de
AuthPass=myVerySecurePwd
UseTLS=YES
#UseSTARTTLS=YES

# Where will the mail seem to come from?
rewriteDomain=ibse-fehse.de

# The full hostname
hostname=ibse-fehse.de
realname="IBSEfehse"

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES

Testen lässt sich die Funktionstüchtigkeit von sSMTP per

$ ssmtp you@mail.co <ENTER>
To: you@mail.co
From: postfach@ibse-fehse.de
Subject: TEST

BODY-TEXT

Anschließend per STRG+D das Senden veranlassen und kurz Abwarten, ob eine Fehlermeldung erscheint oder die eigentliche Konfiguration von mutt erfolgen kann. Die zu bearbeitende Datei ist ~/.muttrc und sieht ungefähr so aus:

set hostname="sn.ibse-fehse.de"

set config_charset="utf-8"
set locale="de_DE"
set charset="utf-8"
set send_charset="us-ascii:iso-8859-15:utf-8"

set hdrs
set edit_headers
set header_cache=".mutt"

ignore *

unignore From:
unignore To:
unignore Message-ID:
unignore Date:
unignore X-Mailer:
unignore X-OS:
unignore X-Operating-System:
unignore X-Knaller:
unignore X-Virus:
unignore User-Agent:
unignore Subject:
unignore X-Newsreader:

my_hdr From: Matthias Fehse <postfach@ibse-fehse.de>
my_hdr Organization: IBSEfehse

set editor="nano"
#set print="muttprint"

set fast_reply
set reply_self=no
set attribution="* %n <%a>:"
set include=yes
set forward_format="[Fwd: %s]"

set imap_user="postfach@ibse-fehse.de"
set imap_pass="myVerySecurePwd"
set imap_list_subscribed=yes

# Automatically log in to this mailbox at startup:
set spoolfile="imaps://mail.your-server.de/INBOX"
# Define the = shortcut, and the entry point for the folder (c?):
set folder="imaps://mail.your-server.de/INBOX"
set record="Sent"
set postponed="Drafts"

# activate TLS if available on the server:
set ssl_starttls=yes
# always use SSL when connecting to a server:
set ssl_force_tls=yes
# Automatically poll subscribed mailboxes for new mail:
set imap_check_subscribed
# Reduce polling frequency to a sane level:
set mail_check=60
# And poll the current mailbox more often:
set timeout=10
# keep a cache of headers for faster loading:
set header_cache=~/.hcache
# Display download progress every 5K:
set net_inc=5

#set smtp_url="smtps://postfach@ibse-fehse.de@mail.your-server.de"
#set smtp_pass="myVerySecurePwd"

auto_view text/html
alternative_order text/plain text/html

#save-hook '~h From:.*' +mbox_2010

set sort=threads

set status_chars = " *%A"
set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"

macro index ">" "c?"
macro pager ">" "c?"

color header yellow default Subject:
color header cyan default .
color body brightyellow default [_a-z\.\$A-Z0-9-]+@[a-zA-Z0-9\./\-]+
color body yellow default (http|ftp)://[_a-zA-Z0-9\./~\-]+
color quoted green default
color signature green default
color indicator yellow blue
color attachment yellow blue
color tree red white
color indicator black cyan
color status yellow blue
color tilde blue default
color normal default default

set alias_file="~/.mutt.aliases"
#source ~/.mutt.aliases

Die Verwendung von mutt bedarf zwar einiger Eingewöhnung, lohnt sich aber meines Erachtens. Hier noch kleine Helferlein zur Verwendung:

$ mutt => Programm starten
y => Liste aller abonnierten Verzeichnisse zum sofortigen Wechsel
c => ermöglicht Angabe einer Mailbox zum Öffnen

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.