Zum Inhalt springen

Postfix einrichten: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Simon Zeberli (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „==Installieren== sudo apt-get update sudo apt-get install postfix ==Postfix configurieren== <syntaxhighlight lang="bash"> # Open up a sudo session so you d…“
 
Simon Zeberli (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
==Installieren==
==Installieren==
https://www.linode.com/docs/email/postfix/postfix-smtp-debian7/
  sudo apt-get update
  sudo apt-get update
sudo apt-get install libsasl2-modules
sudo apt-get install postfix


  sudo apt-get install postfix
  sudo nano /etc/postfix/main.cf
[[Datei:Poftfix.main.cf.png|miniatur]]
<syntaxhighlight lang="bash">
relayhost = smtp.nine.ch:587
smtp_use_tls=yes
</syntaxhighlight>
 
sudo nano /etc/postfix/sasl_passwd
<syntaxhighlight lang="bash">
smtp.nine.ch:587  noreply@backup-zeberliedv.ch:EcPFheWhRDePkw6DlDYB
</syntaxhighlight>
 
sudo postmap /etc/postfix/sasl_passwd


==Postfix configurieren==
==Postfix configurieren==

Version vom 6. Juni 2018, 12:10 Uhr

Installieren

https://www.linode.com/docs/email/postfix/postfix-smtp-debian7/
sudo apt-get update
sudo apt-get install libsasl2-modules
sudo apt-get install postfix
sudo nano /etc/postfix/main.cf
Fehler beim Erstellen des Vorschaubildes: Datei fehlt
relayhost = smtp.nine.ch:587
smtp_use_tls=yes
sudo nano /etc/postfix/sasl_passwd
smtp.nine.ch:587   noreply@backup-zeberliedv.ch:EcPFheWhRDePkw6DlDYB
sudo postmap /etc/postfix/sasl_passwd

Postfix configurieren

# Open up a sudo session so you don't have to preface every
# command with 'sudo' - remember to exit when done!
sudo -s

# postconf is a program that can modify the postfix config file /etc/postfix/main.cf
postconf -e 'relayhost = mailserver:587'
postconf -e 'myorigin = mailserver'

postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='

# Authentication -- Substitute mailserver, username and password here:
echo "mailserver:587   username:password" > /etc/postfix/sasl_passwd 

# Protect this password file
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd

# update the sasl_password.db file using the new password file
postmap /etc/postfix/sasl_passwd

# Restart
service postfix restart

# and exit the sudo session
exit