solutions:postfix_smtp
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| solutions:postfix_smtp [2021-05-24 06:38] – angelegt andreas | solutions:postfix_smtp [2021-05-27 06:33] (aktuell) – andreas | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Einrichtung von Postfix als SMTP Client ====== | ====== Einrichtung von Postfix als SMTP Client ====== | ||
| - | Postfix ist das universelle E-Mail-MTA in Linux. Hier ist beschrieben, | + | Postfix ist das universelle E-Mail-MTA in Linux. Hier ist beschrieben, |
| + | findet man auch auf [[https:// | ||
| + | |||
| + | Vor der Installation von Postfix sollte der Hostname überprüft werden. Der in der /// | ||
| + | |||
| + | Entsprechend den Informationen aus dem Tutorial wird /// | ||
| + | |||
| + | < | ||
| + | # See / | ||
| + | |||
| + | |||
| + | # Debian specific: | ||
| + | # line of that file to be used as the name. The Debian default | ||
| + | # is / | ||
| + | #myorigin = / | ||
| + | |||
| + | smtpd_banner = $myhostname ESMTP $mail_name (Debian/ | ||
| + | biff = no | ||
| + | |||
| + | # appending .domain is the MUA's job. | ||
| + | append_dot_mydomain = no | ||
| + | |||
| + | # Uncomment the next line to generate " | ||
| + | # | ||
| + | |||
| + | readme_directory = no | ||
| + | |||
| + | # See http:// | ||
| + | # fresh installs. | ||
| + | compatibility_level = 2 | ||
| + | |||
| + | |||
| + | |||
| + | # TLS parameters | ||
| + | smtpd_tls_cert_file=/ | ||
| + | smtpd_tls_key_file=/ | ||
| + | smtpd_use_tls=yes | ||
| + | smtpd_tls_session_cache_database = btree: | ||
| + | smtp_tls_session_cache_database = btree: | ||
| + | |||
| + | # See / | ||
| + | # information on enabling SSL in the smtp client. | ||
| + | |||
| + | smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination | ||
| + | myhostname = coonie.local | ||
| + | alias_maps = hash:/ | ||
| + | alias_database = hash:/ | ||
| + | myorigin = / | ||
| + | mydestination = $myhostname, | ||
| + | relayhost = | ||
| + | mynetworks = 127.0.0.0/8 [:: | ||
| + | mailbox_size_limit = 0 | ||
| + | recipient_delimiter = + | ||
| + | inet_interfaces = all | ||
| + | inet_protocols = all | ||
| + | |||
| + | # Enable auth | ||
| + | smtp_sasl_auth_enable = yes | ||
| + | # Set username and password | ||
| + | smtp_sasl_password_maps = static: | ||
| + | smtp_sasl_security_options = noanonymous | ||
| + | # Turn on tls encryption | ||
| + | smtp_tls_security_level = encrypt | ||
| + | header_size_limit = 4096000 | ||
| + | # Set external SMTP relay host here IP or hostname accepted along with a port number. | ||
| + | relayhost = [rubidium.selfhost.de]: | ||
| + | # accept email from our web-server only | ||
| + | inet_interfaces = 127.0.0.1 | ||
| + | |||
| + | # Die SMTP-Verbindung verschlüsseln, | ||
| + | smtp_use_tls = yes | ||
| + | smtp_enforce_tls = yes | ||
| + | # Die folgende Optionen ist für den Fall erforderlich, | ||
| + | # smtp_tls_enforce_peername = no | ||
| + | |||
| + | # Umwandlung der Absenderadresse in eine gültige E-Mail Domain | ||
| + | smtp_generic_maps = hash:/ | ||
| + | </ | ||
| + | |||
| + | Wenn diese Datei angepasst ist, braucht es einen Restart des Service postfix und dann können E-Mails versendet werden. Notwendig ist noch ein E-Mail Programm, das mit | ||
| + | |||
| + | < | ||
| + | $ sudo apt install mailutils | ||
| + | </ | ||
| + | |||
| + | installiert wird. | ||
| + | |||
| + | Um die E-Mails an einen lokalen User (z.B. andreas) auf eine andere E-Mail Adresse umzuleiten wird die Datei /// | ||
| + | |||
| + | < | ||
| + | postmaster: root | ||
| + | andreas: andreas@koecher.it | ||
| + | </ | ||
| + | |||
| + | Änderungen in /// | ||
| + | < | ||
| + | $ sudo newaliases | ||
| + | </ | ||
| + | bekannt gemacht werden. | ||
| + | |||
| + | Um die Absenderadresse anzupassen, z. B. wenn die Absenderadresse nicht aus den Internet erreichbar ist wird die Datei /// | ||
| + | < | ||
| + | hinzugefügt. | ||
| + | |||
| + | In /// | ||
| + | werden die Absender wie folgt eingetragen: | ||
| + | < | ||
| + | |||
| + | |||
| + | Nach der Erstellung der Datei muss diese mit < | ||
| + | |||
solutions/postfix_smtp.1621838311.txt.gz · Zuletzt geändert: 2021-05-24 06:38 von andreas
