Setting up simple mail server with sendmail + dovecot + squirrelmail on fedora 26
Sendmail is a MTA (Mail Transfer Agent) in Linux used to send emails. Dovecot is a mail authentication software. Squirrelmail is a mail user agent similar to an email client.
dnf install sendmail sendmail-cf sendmail-doc cyrus-sasl-{lib,plain} dovecot squirrelmail
Edit /etc/mail/sendmail.mc:
DAEMON_OPTIONS('Port=smtp,Name=MTA')dnlLOCAL_DOMAIN('server.sand.box')dnlBuild the configuration file:
cd /etc/mail
make all
Restart sendmail:
systemctl restart sendmail
cd /usr/share/squirrelmail/config/
./config.pl
Set organization preferences and server settings as needed.
Edit configuration files in /etc/dovecot/:
10-mail.conf: set mail_location = maildir:~/Maildir10-ssl.conf: set ssl = yes10-auth.conf: set disable_plaintext_auth = no and auth_mechanisms = plain logindovecot.conf: set protocols = imap pop3 lmtp and listen = *Restart services:
systemctl restart dovecot; systemctl restart sendmail; systemctl restart httpd
Now you can access Squirrelmail from https://localhost/webmail.
To forward root emails to another user:
formail -s /usr/sbin/sendmail -oi -t < /var/mail/root
Related Articles
Setting up simple mail server with sendmail + dovecot + squirrelmail on fedora 26
Set up a complete mail server with Sendmail, Dovecot, and Squirrelmail on Fedora 26.
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.
Installing eve-ng on ubuntu 24.04 LTS
Step-by-step guide to installing EVE-NG on Ubuntu 24.04 LTS bare metal server for running network labs.