Postfix: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 14: Zeile 14:


= Konfiguration =
= Konfiguration =
* Minimalkonfiguration für Weiterleitung: /etc/postfix/main.cf
<pre>...
<pre>...
smtpd_recipient_restrictions = reject_invalid_hostname,
mydestination = $myhostname, localhost.hamatoma.de, localhost, hamatoma.de
        reject_unknown_recipient_domain,
...
        reject_unauth_destination,
# == wk config:
        reject_rbl_client sbl.spamhaus.org,
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
        permit


smtpd_helo_restrictions = reject_invalid_helo_hostname,
# Format maildir (statt mailbox):
        reject_non_fqdn_helo_hostname,
home_mailbox = Maildir/
        reject_unknown_helo_hostname


smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = f-r-e-i.de
virtual_alias_domains = f-r-e-i.de
</pre>
* Aktivierung mit "postmap /etc/postfix/virtual"
* /etc/aliases
<pre># /etc/aliases
# See man 5 aliases for format
postmaster:    root
devnull: /dev/null
mailer-daemon: postmaster
webmaster: root
www: root
security: root


# Format maildir (statt mailbox):
# Weiterleitung an externe Adresse:
home_mailbox = Maildir/
root: hamatoma@gmx.de
virtual_uid_maps = static:150
virtual_gid_maps = static:150
virtual_mailbox_maps    = hash:/etc/postfix/vmaps
 
</pre>
</pre>

Version vom 8. Oktober 2019, 21:47 Uhr


Vorarbeiten

  • Domain einrichten, z.B. "dromedar.hamatoma.de"
  • DNS-PTR-Record der IP-Adresse auf dromedar.hamatoma.de setzen
  • Hostname auf "dromedar.hamatoma.de" setzen


Installation

apt install postfix
# "Internet-Site" wählen

Konfiguration

  • Minimalkonfiguration für Weiterleitung: /etc/postfix/main.cf
...
mydestination = $myhostname, localhost.hamatoma.de, localhost, hamatoma.de
...
# == wk config:
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination

# Format maildir (statt mailbox):
home_mailbox = Maildir/

virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = f-r-e-i.de
  • Aktivierung mit "postmap /etc/postfix/virtual"
  • /etc/aliases
# /etc/aliases
# See man 5 aliases for format
postmaster:    root
devnull: /dev/null
mailer-daemon: postmaster
webmaster: root
www: root
security: root

# Weiterleitung an externe Adresse:
root: hamatoma@gmx.de