Postfix: Unterschied zwischen den Versionen

Aus CodicaTipps
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Siehe auch [[Mail unter Linux#SMTP-Server]]
Siehe auch [[Mail unter Linux#SMTP-Server]], [[Mail unter Linux#Einfacher MTA mittels Postfix]]




== Einrichten von Postfix zum Versenden über Mail-Provider arcor.de ==
Installation:<ref>Vgl. https://wiki.ubuntuusers.de/postfix</ref>
  sudo aptitude install postfix libsasl2-modules bsd-mailx
Konfiguration
  sudo dpkg-reconfigure postfix
* System: Satellitensystem
* Eigene Domain: <code>eigenerserver.de</code> oder ein anderer frei wählbarer Name (unten wird arcor-Adresse dann ausgewählt)
* SMTP-Relay-Server: mail.arcor.de
Konfigurationsdatei <code>/etc/postfix/main.cf</code>
* Hinzufügen folgender Zeilen:
  smtp_sasl_auth_enable = yes
  smtp_sasl_security_options = noanonymous
  smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
  smtp_tls_security_level = may
  sender_canonical_maps = hash:/etc/postfix/sender_canonical
Passwortdatei <code>/etc/postfix/sasl_password</code>
  mail.arcor.de  EMAIL@arcor.de:PASSWORT
EMAIL und PASSWORT müssen natürlich angepasst werden. Danach hashen:
  sudo chmod 600 /etc/postfix/sasl_password
  sudo postmap hash:/etc/postfix/sasl_password
Absenderdatei <code>/postfix/sender_canonical</code>
  LINUX_USER1 EMAIL1@arcor.de
  root        EMAIL2@arcor.de
Auch hier sind LINUX_USER1 und EMAIL1 etc. anzupassen. Danach umwandeln in Datenbank:
  sudo postmap /etc/postfix/sender_canonical
Neustart von Postfix
  sudo service postfix restart
Test
  mail -s "hello" mein@private_email.de
Mit einem anderen Absender:
  echo test | mail -s "helloXX" EMAIL4@gmx.de -a "From:VORNAME NACHNAME<EMAIL2@arcor.de>"
== Nur Mails von localhost versenden ==
Mit der Zeile
  inet_interfaces = 127.0.0.1
statt
  inet_interfaces = all
in <code>/etc/postfix/main.cf</code> wird verhindert, dass Mails auch von anderen Servern als localhost versendet werden können.


== Nutzen mehrerer Smarthosts ==
== Nutzen mehrerer Smarthosts ==


Siehe
Siehe
* https://wiki.ubuntuusers.de/Postfix/Erweiterte_Konfiguration#Sender-abhaengige-Authentifizierung
* https://ubuntu-tutorials.com/2009/03/13/configure-postfix-for-multiple-isp-client-smtp-authentication/
* https://ubuntu-tutorials.com/2009/03/13/configure-postfix-for-multiple-isp-client-smtp-authentication/



Aktuelle Version vom 12. Juli 2017, 19:37 Uhr

Siehe auch Mail unter Linux#SMTP-Server, Mail unter Linux#Einfacher MTA mittels Postfix


Einrichten von Postfix zum Versenden über Mail-Provider arcor.de

Installation:[1]

 sudo aptitude install postfix libsasl2-modules bsd-mailx 

Konfiguration

 sudo dpkg-reconfigure postfix
  • System: Satellitensystem
  • Eigene Domain: eigenerserver.de oder ein anderer frei wählbarer Name (unten wird arcor-Adresse dann ausgewählt)
  • SMTP-Relay-Server: mail.arcor.de

Konfigurationsdatei /etc/postfix/main.cf

  • Hinzufügen folgender Zeilen:
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous
 smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
 smtp_tls_security_level = may
 sender_canonical_maps = hash:/etc/postfix/sender_canonical

Passwortdatei /etc/postfix/sasl_password

 mail.arcor.de  EMAIL@arcor.de:PASSWORT

EMAIL und PASSWORT müssen natürlich angepasst werden. Danach hashen:

 sudo chmod 600 /etc/postfix/sasl_password 
 sudo postmap hash:/etc/postfix/sasl_password 

Absenderdatei /postfix/sender_canonical

 LINUX_USER1 EMAIL1@arcor.de
 root        EMAIL2@arcor.de

Auch hier sind LINUX_USER1 und EMAIL1 etc. anzupassen. Danach umwandeln in Datenbank:

 sudo postmap /etc/postfix/sender_canonical 


Neustart von Postfix

 sudo service postfix restart

Test

 mail -s "hello" mein@private_email.de

Mit einem anderen Absender:

 echo test | mail -s "helloXX" EMAIL4@gmx.de -a "From:VORNAME NACHNAME<EMAIL2@arcor.de>"

Nur Mails von localhost versenden

Mit der Zeile

 inet_interfaces = 127.0.0.1

statt

 inet_interfaces = all

in /etc/postfix/main.cf wird verhindert, dass Mails auch von anderen Servern als localhost versendet werden können.

Nutzen mehrerer Smarthosts

Siehe

Weiterführendes

Siehe