[postfix-users] relay_domain in mysql mit Ausnahmen
Hallo Liste,
ich möchte meine Postfix Einstellung in eine MySQL DB übertragen. Und nun stolpere ich über die Einstellungen für die relay_domains. ich habe folgende Einstellungen in meiner main.cf:
relay_domains = $mydestination mysql:/etc/postfix/relay_domains.cf
parent_domain_matches_subdomains = fast_flush_domains,mynetworks,relay_domains
/etc/postfix/relay_domains.cf:
user = postfix password = xxx dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and active = 1
Meine vorherigen Einstellungen sahen so aus:
relay_domains = $mydestination /etc/postfix/domains
mit /etc/postfix/domains:
!subdomain1.example.com
example.com
Ich möchte also für alle subdomains von example.com relayen aber nicht fur subdomain1.example.com. Wie bilde ich das jetzt in meiner Datenbank ab?
Ich stehe gerade auf dem Schlauch. Schon mal danke für eure Hilfe.
Gruß
Stefan
Hallo,
Am 30.06.2010 18:09, schrieb Stefan:
relay_domains = $mydestination mysql:/etc/postfix/relay_domains.cf
was macht der Wert von $mydestination in den $relay_domains? Das passt nicht. Entweder willst du für Empfänger dieser Domain(s) relayen oder lokal zustellen.
/etc/postfix/relay_domains.cf:
user = postfix password = xxx dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and active = 1
[...]
Ich möchte also für alle subdomains von example.com relayen aber nicht fur subdomain1.example.com. Wie bilde ich das jetzt in meiner Datenbank ab?
passe die SQL-Abfrage so an, dass sie die Subdomain nicht matcht:
SELECT domain FROM domain WHERE domain='%s' and active = 1 and domain <> 'subdomain1.example.com'
Gruß Christian
participants (2)
-
Christian Flothmann
-
Stefan