ich habe das Problem, dass auf meinem Server mehrere Domains hinterlegt sind.
Als Hauptdomain (auf diese läuft auch der Server nutze ich domain1.de).
Ich habe Postfix so konfiguriert, dass per Postfixadmin mehrer Domains verwaltet werden können. Hier nutze ich auch Domain2.de.
Schicke ich eine Mail von Extern an markus@domain1.de funktioniert dies wunderbar.
Von Extern an markus@domain2.de funktioniert nicht.
Intern von markus@domain1.de an markus@domain2.de gibt es keine Probleme, auch umgekehrt funktioniert es wunderbar.
Genauso erreiche Mails von markus@domain1.de und markus@domain2.de auch externe Adressen.
Meine /etc/postfix/main.cf
Code: Select all
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 1
default_destination_concurrency_limit = 10
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.5.5/html
inet_interfaces = all
inet_protocols = ipv4, ipv6
local_destination_concurrency_limit = 10
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = domain1.de
myhostname = name.domain1.de
mynetworks = 127.0.0.0/8 ip.adres.se.0/24 [::1]/128 [ipv6:adresse::]/64
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.5.5/readme
relay_domains = proxy:pgsql:/etc/postfix/pgsql/relay-domains.cf
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_bind_address6 = ipv6:adresse::1
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_connection_count_limit = 100
smtpd_client_connection_rate_limit = 30
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unknown_sender_domain, reject_invalid_hostname, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/tls/cacert.pem
smtpd_tls_cert_file = /etc/postfix/tls/newcert.pem
smtpd_tls_key_file = /etc/postfix/tls/newkey.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 450
virtual_alias_maps = proxy:pgsql:/etc/postfix/pgsql/virtual-alias-maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:pgsql:/etc/postfix/pgsql/virtual-domains.cf
virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql/virtual-mailbox-maps.cf
virtual_uid_maps = static:1000
Mein bind9 Eintrag für die Domain2:
Code: Select all
$TTL 1D
@ IN SOA dns1.domain1.de. root (
2009250401 ;serial
3h ;refresh after 3h
1h ;retry after 1h
1w ;expire after 1d
1d) ;minimum ttl of 1d
IN NS dns1.domain1.de.
IN NS ns1.domain.de.
IN MX 10 mail.domain1.de.
;IPv6
domain2.de. IN AAAA ipv6:adresse::1
hostname IN AAAA ipv6:adresse::1
;IPv4
domain2.de. IN A ip.v4.addr.esse
hostname IN A ip.v4.addr.esse
www IN CNAME hostname