-------- Original-Nachricht --------
> Datum: Tue, 25 Aug 2009 12:24:15 -0700
> Von: Cameron Camp <came...@logicalwebhost.com>
> An: postfix-us...@cloud9.net
> Betreff: check_sender_access to virtual map?

> LuKreme said to use:
> 
> check_sender_access hash:/etc/postfix/mydomain
> 
> == mydomain
> example.com     REJECT you cannot send on behalf of example.com
> .example.com    REJECT you cannot send on behalf of example.com
> 
> can I use:
> 
> check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
> 
Assuming the MySQL db you use has a table called domain and in that table you 
have a field domain holding the domain name and a field transport holding the 
transport used for that domain and assuming you want to limit that reject to 
domains using transport "maildrop", "local", "mailman", "virtual", "smtp", 
"securetls", "cyrus" and "dovecot" then I would construct the following query 
for Postfix to reject anyone claiming to be one of your domains:

query = SELECT CONCAT('REJECT You are not ','%s') FROM domain WHERE (('%s' LIKE 
CONCAT('%.',domain)) OR (domain='%s')) AND transport REGEXP 
'^\(maildrop\|local\|mailman\|virtual\|smtp\|securetls\|cyrus\|dovecot\)\:?' 
LIMIT 1


> and if so, what entry should I add in mysql db mail table domains?
> 
> thx,
> Cameron
>
Steve
-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

Reply via email to