On Wed, 2009-01-21 at 12:56 -0600, Noel Jones wrote: > ram wrote: > > I have a postfix 2.5 server with two transport files , one hash map and > > another regex > > I want the hash map to take preference over the regex which doesnt seem > > to be happenning > > > > ---------------- > > > > [r...@50.133 postfix]# postconf -n > > command_directory = /usr/sbin > > config_directory = /etc/postfix > > daemon_directory = /usr/libexec/postfix > > data_directory = /var/lib/postfix > > debug_peer_level = 2 > > mail_owner = postfix > > mailq_path = /usr/bin/mailq.postfix > > manpage_directory = /usr/share/man > > newaliases_path = /usr/bin/newaliases.postfix > > queue_directory = /var/spool/postfix > > sample_directory = /etc/postfix > > sendmail_path = /usr/sbin/sendmail.postfix > > setgid_group = postdrop > > transport_maps = > > hash:/etc/postfix/transport,regexp:/etc/postfix/transport_regex > > > > > > [r...@50.133 postfix]# postmap -q netcore.co.in /etc/postfix/transport > > :[192.168.2.105] > > > > > > [r...@50.133 postfix]# cat /etc/postfix/transport_regex > > /netcore.co.in/ :[192.168.2.226] > > > > -------------- > > What is the purpose of the regexp file? Why do you have the > same key listed in both? >
That was just an example. In real life I dont have the exact same key but I have matches in both > Search order is documented in the transport(5) man page. When > multiple tables are present, each table is searched in the > order specified. The first match stops the search. Since > your regexp matches the first user+extens...@domain search, no > further searches will be performed. > But the hash file matches the domain, why wouldnt that take precedence over the hash table > Also note your expression is somewhat broken, but that's not > the whole problem. Maybe you're trying to match subdomains? > /\.netcore\.co\.in$/ :[192.168.2.226] I need to escape the dots. Right. But thats not he "whole" problem :-) > >