2009-06-11 1 views
-1

möchte ich meine/etc/postfix/virtual-Datei:Postfix virtuellen: geordneten Domäne entspricht Subdomains - ich es nicht

sub.domain.com DOMAIN 
@sub.domain.com user2 

domain.com DOMAIN 
@domain.com user1 

Die E-Mail für @ sub.domain.com noch zu user1 geht und das ist nicht was ich will. Hier ist meine /etc/postfix/my.cnf nur in Fällen:

mydomain = domain.com 
myhostname = mail.domain.com 
alias_maps = hash:/etc/aliases 
alias_database = hash:/etc/aliases 
virtual_alias_maps = hash:/etc/postfix/virtual 
myorigin = $mydomain 
mydestination = $myhostname, $mydomain, localhost 
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
mailbox_size_limit = 1073741824 
recipient_delimiter = + 
inet_interfaces = all 
parent_domain_matches_subdomains = 

Beachten Sie, dass ich parent_domain_matches_subdomains gesetzt zu leeren. Aber es hilft immer noch nicht. Irgendwelche Ideen?

Antwort

1

Die rechte Seite Ihrer Tabelle virtual_alias_maps ist ein nicht qualifizierter Benutzername.

Postfix anhängt $ myorigin unqualifizierte Benutzernamen, so dass es effektiv

@ sub.example.com [email protected] @ example.com [email protected]

Jetzt [email protected] wird vom Catchall für @ example.com abgefangen.

Daher geht Mail für [email protected] zu user1.

Sie könnten Ihre Postfix config dies ändern:

 
mydomain = example.com 
myhostname = mail.example.com 
alias_maps = hash:/etc/aliases 
alias_database = hash:/etc/aliases 
virtual_alias_maps = hash:/etc/postfix/virtual 
myorigin = $mydomain 
mydestination = $myhostname, $mydomain, localhost 
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
mailbox_size_limit = 1073741824 
recipient_delimiter = + 
inet_interfaces = all 
parent_domain_matches_subdomains = 
virtual_alias_domains = sub.example.com 
luser_relay = [email protected] 

/etc/postfix/virtual
@ sub.example.com [email protected]

zwei System erstellen Konten user1 und user2 .

+0

Etwas einfachere Lösung, aber Ihre Antwort hat mir geholfen, es zu finden: Ich habe @ localhost nur an user1 und user2 an meine/etc/postfix/virtuelle Datei angehängt. – snitko