This article describes an old-school email client setup.
Why is an email solution from the 1990s still useful in the 2020s?
Procmail is a simple mail delivery agent (MDA).
If a given regular expression is matched,
the mail is delivered into the specified mailbox.
Installation:
sudo apt install procmail
Specify the local mail directories:
$HOME/.procmailrc
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/default/
LOGFILE=$MAILDIR/procmail.log
:0
* ^TO_johndoe@gmx\.net
johndoe@gmx.net/
:0
* ^From.*johndoe@gmx\.net
johndoe@gmx.net/.Sent/
Ensure the directories exist:
mkdir -p $HOME/Mail/default
mkdir -p $HOME/Mail/johndoe@gmx.net
Fetchmail is a mail retrieval agent (MRA).
Installation:
sudo apt install fetchmail
Configure the email account:
$HOME/.fetchmailrc
poll imap.gmx.net
protocol imap
username "johndoe@gmx.net"
password "secretpassword"
ssl
folders INBOX,Sent,Gesendet
keep
mda "/usr/bin/procmail -d %T"
Because the file contains passwords,
ensure that only the file owner can read it:
chmod 0600 $HOME/.fetchmailrc
Download new emails:
fetchmail
Download all emails:
(might create duplicates)
fetchmail --all
Mutt is a terminal-based mail user agent (MUA), an email client.
Installation:
sudo apt install mutt
View and search downloaded emails:
mutt -f $HOME/Mail/johndoe@gmx.net/