Postfix
Beschreibung
Download
Installation
Konfiguration
Via SMTP Relay Host
apt install mailutils postfixnano /etc/postfix/main.cf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = <FQDN>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.localdomain, localhost
relayhost = <smtphost>:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps
smtp_header_checks = regexp:/etc/postfix/header_checknano /etc/postfix/sasl_passwd
[smtp.mailserver.de]:587 benutzername@server:passwortpostmap /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.dbnano /etc/postfix/sender_canonical_maps
/.+/ newsender@address.comnano /etc/postfix/header_check
/From:.*/ REPLACE From: newsender@address.comsystemctl restart postfixUpdate
Test
echo "Testnachricht" | mail -s "Testmail" <emailadresse>
Fehlerbehebung
Starten/Stoppen funktioniert nicht
Lösung 1
auszufüllen