Skip to content

email server setup Notes

ipatch edited this page May 7, 2018 · 1 revision

Table of Contents

Useful Debian commands

  • To set the timezone
dpkg-reconfigure tzdata

Definitions

  • dovecot - an open source pop3 / imap mail server

Useful dovecot commands

  • To install dovecot on a Debian based distro
apt-get install dovecot
  • To print the installed version of dovecot
dovecot --version 
  • dovecot configuration file location

/etc/dovecot/dovecot.conf

Useful postfix commands

To install postfix on a Debian based system

apt-get install postfix

To print the currently isntalled version of postfix

postconf -d | grep mail_version

the main configuration files for postfix are main.cf and master.cf

To restart postfix after editing configuration files

postfix restart
/etc/init.d/postfix restart

To reload postfix configuration file, main.cf

postfix reload

To mail aliases edit the below file

/etc/aliases

Configuration settings for postfix

SSL parameters / configuration

  • smtpd_tls_cert_file - /etc/ssl/certs/dovecot.pem
  • smtpd_tls_key_file - /etc/ssl/private/dovecot.pem
  • smtpd_tls_CAfile - /etc/ssl/certs/ca-certificates.crt
  • smtp_tls_CAfile - /etc/ssl/certs/ca-certificate.crt
  • smtpd_use_tls - yes

troubleshooting

fatal: no SASL authentication mechanisms

apt-get install sasl2-bin

warning: SASL: Connect to private/auth failed: No such file or directory see πŸ™ˆ

terminal based email clients

  • mutt To install mutt
apt-get install mutt

mutt Notes

edit the below file to set where mutt will look for the inbox

/etc/Muttrc

Troubleshooting - Postfix

When upgrading from Debian Jessie 8.x to Debian Stretch 9.x postfix was not automatically starting via systemd, ie. would not start when the server was rebooted. To fix the above mentioned issue.

systemctl enable postfix@-

Thanks Kurt πŸ‘

Useful Links

TODO

  • [ ]flesh out table of contents!
Clone this wiki locally