[Postfixbuch-users] Probleme bei Kombination aus virtual domains und unix usern

Matthias Haegele mhaegele at linuxrocks.dyndns.org
Di Nov 11 10:00:22 CET 2008


Felix Knecht schrieb:
> Hallo,
> 
> ich habe ein Postfix 2.3.8 in Verbindung mit einem Cyrus 2.1.18 laufen.
> 
> Bisher hatte ich das erfolgreich mit nur einer Domain am laufen.
> Ich moechte jetzt gerne zwei Domains auf einem Server hosten
> (mailtechnisch) und dabei getrennte Empfaengerbereiche haben.
> 
> Also so:
> 
> userB at domainB.de -> unix acount userB
> userA at domainB.de -> Bounce
> userA at domainA.de -> unix account userA
> 
> Zusaetzlich haette ich gerne auf domainA.de ein catch-all. Also kommt dazu:
> userB at domainA.de -> unix account userA
> 
> userB at domainA.de soll also NICHT an userB zugestellt werden!
> Auf domainB.de gibt es auch kein Catchall und NUR emails an
> userB at domainB.de sollen auch userB zugestellt werden. Alles andere soll
> bouncen.
> 
> Ich habe meine Konfiguration angehaengt, aber ich habe das Problem, dass
> das catchall alle Mails faengt. Habe schon diverse Sachen im Netz
> ausprobiert (zb alle Domains virtuell zu machen). Bei manchen kann ich
> gar nichts mehr empfangen, bei anderen funktioniert das catch-all auf
> domainA.de zwar, aber userB empfaengt auf die emails an
> userB at domainA.de, die durch das catchall ja eigentlich an userA gehen
> sollten.
> 
> Kann mir jemand sagen, wie die richtige Kombination von mydestination,
> virtual_alias_domains und virtual_maps auszusehen hat?
> 
> Hier meine Konfig:
> 
> main.cf:
> smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
> biff = no
> 
> # appending .domain is the MUA's job.
> append_dot_mydomain = no
> 
> # Uncomment the next line to generate "delayed mail" warnings
> #delay_warning_time = 4h
> 
> # TLS parameters
> smtpd_tls_cert_file=/etc/ssl/certs/xxx.crt
> smtpd_tls_key_file=/etc/ssl/private/xxx.key
> smtpd_tls_CAfile = /etc/ssl/certs/xxx.ca-bundle
> smtpd_tls_auth_only = yes
> smtpd_use_tls=yes
> smtpd_tls_loglevel = 3
> smtpd_tls_received_header = yes
> smtpd_tls_session_cache_timeout = 3600s
> tls_random_source = dev:/dev/urandom
> smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
> smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
> 
> myhostname = domainA.de
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> myorigin = /etc/mailname
> mydestination = domainA.de
> relayhost =
> mynetworks = 127.0.0.0/8
> mailbox_command = procmail -a "$EXTENSION"
> mailbox_size_limit = 0
> recipient_delimiter = +
> inet_interfaces = all
> inet_protocols = all
> smtpd_sasl_local_domain =
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_security_options = noanonymous
> broken_sasl_auth_clients = yes
> 
> smtpd_recipient_restrictions = permit_sasl_authenticated,
>                                 permit_mynetworks,
>                                 reject_unauth_destination,
>                                 check_recipient_access
> hash:/etc/postfix/recipients,
>                                 check_policy_service inet:127.0.0.1:60000,
>                                 check_policy_service unix:private/spfpolicy,
>                                 permit
> 
> spfpolicy_time_limit = 3600
> inet_interfaces = all
> 
> mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
> 
> # Virtual Domain Settings
> virtual_alias_domains = domainB.de
> virtual_alias_maps = hash:/etc/postfix/virtual
> delay_warning_time = 30m
> maximal_queue_lifetime = 1d
> 
> 
> /etc/postfix/virtual:
> 
> userB at domainB.de userB
> userC at domainA.de anything
> @domainA.de userA
> 
> 
> /etc/postfix/recipients
> userC at domainA.de REJECT 550 User unknown
> 
> Dies nur der Vollstaendigkeit halber. Ich moechte trotz catchall
> bestimmte Adressen von domainA.de rejecten. Das klappt auch so super.
> 
> 
> 
> Kann mir jemand weiterhelfen?

Wie sieht denn das Log aus für eine Mail die eigentlich nicht angenommen
werden sollte,
also eine für DomainB wenn ich das richtig verstanden habe?
Nach welcher Adresse wird das dann aufgelöst, kannst das mal zeigen?
Steht vielleicht noch was in /etc/aliases das vergessen wurde?

Postfix nimmt nix an was es nicht zuweisen kann (Momentan blick ich
allerdings ehrlich gesagt bei deiner Konfig nicht so ganz durch ;-)).

> Gruss,
> Felix
> 


-- 
Gruesse/Greetings
MH


Dont send mail to: ubecatcher at linuxrocks.dyndns.org
--




Mehr Informationen über die Mailingliste Postfixbuch-users