Mail setup

Download the certificates with get_certs.sh #!/bin/sh # Usage: # get_certs.sh example.server.com SERVER=${1:-my.server.com} PORT=${2:-993} CERT_FOLDER=${3:-~/.certs} openssl s_client -connect ${SERVER}:${PORT} -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'| sed -ne '1,/-END CERTIFICATE-/p' > ${CERT_FOLDER}/${SERVER}.pem The next script (located e.g. in ~/.mutt/createMaildirs.sh) will create the main mail directory and subdirectories, as well as fake directories which separate the inboxes in mutt’s sidebar: for account in aalto autistici disroot gmail posteo riseup ; do mkdir -p ~/mail/======${account^^}/{cur,tmp,new} #Create fake dirs with capitals ${s^^} mkdir -p ~/.mail/$account/{cur,tmp,new} done

March 15, 2020 · Alberto Casado