Postfix: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
[[Kategorie:ServerApplikation]]
[[Kategorie:ServerApplikation]]


== Smart Host ==
= Intern nach Extern =
* /etc/postfix/main.cf
<pre>#/etc/aliases
<pre>smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
postmaster:    root
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
devnull: /dev/null
smtpd_use_tls=yes
mailer-daemon: postmaster
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
webmaster: root
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache


myhostname = vmd9593.e-motional-experience.de
# Weiterleitung an externe Adresse:
 
root: hamatoma@gmx.de
relayhost = [mail.gmx.net]
smtp_sasl_auth_enabled = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_tls_security_level = may
</pre>
</pre>
* /etc/postfix/sasl_passwd
<pre># Activate
<pre>echo "[mail.gmx.net] 314444931:1G.e.h.t.H.e.i.m" > /etc/postfix/sasl_passwd
newaliases
postmap /etc/postfix/sasl_passwd
</pre>
</pre>
== Zentrales Postfachverzeichis==
Wenn man Postfachbenutzer hat, die keine Systemkontos haben, so bietet sich ein
zentrales Verzeichnis für alle Postfächer an


<pre>
= Internet site =
# /etc/postfix/main.cf:
<pre># /etc/postfix/main.cf
virtual_mailbox_domains = f-r-e-i.de
...
virtual_mailbox_base = /home/Mail/
# anti-spam: smtp restrictions
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
smtpd_recipient_restrictions = reject_invalid_hostname,
virtual_minimum_uid = 1030
        reject_unknown_recipient_domain,
virtual_uid_maps = static:1033
        reject_unauth_destination,
virtual_gid_maps = static:533
        reject_rbl_client sbl.spamhaus.org,
</pre>
        permit
<pre>
smtpd_helo_restrictions = reject_invalid_helo_hostname,
# /etc/postfix/vmailbox:
        reject_non_fqdn_helo_hostname,
wk@f-r-e-i.de    f-r-e-i.de/wk
        reject_unknown_helo_hostname
# Comment out the entry below to implement a catch-all.
smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net
# @ef-r-e-i.de    f-r-e-i.de/catchall
</pre>
Aktivieren der Konfiguration:
<pre>
postmap /etc/postfix/vmailbox
/etc/init.d/postfix restart
</pre>


== Weiterleitung ==
# Weiterleitung
main.cf:
<pre>virtual_alias_domains = i-sar.de f-r-e-i.de hm.f-r-e-i.de miteinander-reden.com au.f-r-e-i.de siduction.net siduction.org emas-consult.de
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
</pre>
virtual_alias_domains = hamatoma.de
virtual:
<pre>hm@f-r-e-i.de hamatoma@gmx.de
</pre>
</pre>


== Smarthost mit GMail ==
= Smarthost mit GMail =
* main.cf:
* main.cf:
<pre>smtp_sasl_auth_enable = yes
<pre>smtp_sasl_auth_enable = yes

Version vom 27. September 2019, 17:40 Uhr


Intern nach Extern

#/etc/aliases
postmaster:    root
devnull: /dev/null
mailer-daemon: postmaster
webmaster: root

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

Internet site

# /etc/postfix/main.cf
...
# anti-spam: smtp restrictions
smtpd_recipient_restrictions = reject_invalid_hostname,
        reject_unknown_recipient_domain,
        reject_unauth_destination,
        reject_rbl_client sbl.spamhaus.org,
        permit
smtpd_helo_restrictions = reject_invalid_helo_hostname,
        reject_non_fqdn_helo_hostname,
        reject_unknown_helo_hostname
smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net

# Weiterleitung
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hamatoma.de

Smarthost mit GMail

  • main.cf:
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_connection_cache_on_demand = no
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_use_tls=yes
smtp_tls_security_level = may
smtp_sasl_security_options=noanonymous

relayhost = [smtp.gmail.com]:587
  • /etc/postfix/sender_canonical
root anyUser@gmail.com
jonny blubBlub@gmail.com
  • /etc/postfix/virtual
root	root.myhost@gmx.de
jonny	blubBlub@gmail.com
  • /etc/postfix/sasl_password
[smtp.gmail.com]:587 my.server@gmail.com:Geheim
postmap sender_canonical
postmap sasl_password
postmap virtual