Arch Linux Mail Servers - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux Mail Servers Guide
Complete beginner-friendly guide to mail servers on Arch Linux, including Postfix, Dovecot, and mail server configuration.
Table of Contents
Postfix Setup
Install Postfix
Install Postfix:
# Install Postfix
sudo pacman -S postfix
# Enable service
sudo systemctl enable postfix
sudo systemctl start postfix
Configure Postfix
Edit config:
# Edit main config
sudo vim /etc/postfix/main.cf
Settings:
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
Dovecot Setup
Install Dovecot
Install Dovecot:
# Install Dovecot
sudo pacman -S dovecot
# Enable service
sudo systemctl enable dovecot
sudo systemctl start dovecot
Configure Dovecot
Edit config:
# Edit config
sudo vim /etc/dovecot/dovecot.conf
Mail Server Configuration
Test Mail Server
Test:
# Send test email
echo "Test" | mail -s "Test" [email protected]
# Check mail queue
postqueue -p
Troubleshooting
Mail Not Sending
Check logs:
# Check Postfix logs
sudo journalctl -u postfix
# Check mail queue
postqueue -p
Summary
This guide covered Postfix, Dovecot, mail server configuration, and troubleshooting.
Next Steps
- Arch Linux Networking - Network setup
- Arch Linux Security Configuration - Security
- ArchWiki Mail Server: https://wiki.archlinux.org/title/Postfix
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.