Postfix¶
Mailserver-Grundkonfiguration.
Installation¶
sudo apt update
sudo apt install postfix mailutils
Grundkonfiguration¶
sudo nano /etc/postfix/main.cf
Basis-Einstellungen¶
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
home_mailbox = Maildir/
SMTP Auth¶
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
Service starten¶
sudo systemctl restart postfix
sudo systemctl enable postfix
Test¶
echo "Test Email" | mail -s "Test Subject" user@example.com
Logs prüfen¶
sudo tail -f /var/log/mail.log
Zurück zur Mailserver-Übersicht