Hi,

On Tue, 10 Nov 2009 09:03:56 +0200, Jack Knowlton <jknowl...@vp44.com> wrote:
Is it possible to have a transport map with a regular expression? What I
want is to use an external relay server for all the emails to be delivered
on Yahoo domains (eg, yahoo.com, yahoo.co.uk, yahoo.es, ecc).
If it is possible, how can I implement this?

I'm not an expert, but I believe this is possible by specifying your transport file as "transport_maps=regexp:/etc/postfix/transport". You may also use PCRE instead of regexp if you prefer. The only downside is that the entire file needs to be set up in the regex/pcre fashion (as far as I'm aware anyway).

ie:

/yahoo.[a-z]*/             relay:[127.0.0.2]
/test.com/                 relay:[127.0.0.3]

[postfix]$ postmap -q "yahoo.com" regexp:/etc/postfix/transport
smtp:[127.0.0.2]

Hope this helps you,
Cheers,
Marc

Reply via email to