Postfix

Aus Info-Theke
Zur Navigation springen Zur Suche springen


Smart Host

  • /etc/postfix/main.cf
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = vmd9593.e-motional-experience.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
  • /etc/postfix/sasl_passwd
echo "[mail.gmx.net] 314444931:1G.e.h.t.H.e.i.m" > /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

Zentrales Postfachverzeichis

Wenn man Postfachbenutzer hat, die keine Systemkontos haben, so bietet sich ein zentrales Verzeichnis für alle Postfächer an

# /etc/postfix/main.cf:
virtual_mailbox_domains = f-r-e-i.de
virtual_mailbox_base = /home/Mail/
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 1030
virtual_uid_maps = static:1033
virtual_gid_maps = static:533
# /etc/postfix/vmailbox:
wk@f-r-e-i.de    f-r-e-i.de/wk
# Comment out the entry below to implement a catch-all.
# @ef-r-e-i.de     f-r-e-i.de/catchall

Aktivieren der Konfiguration:

postmap /etc/postfix/vmailbox
/etc/init.d/postfix restart

Weiterleitung

main.cf:

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:

hm@f-r-e-i.de hamatoma@gmx.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

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