Hello,

I would like to add further condition for delivery of email messages.

In my main.cf I have this setting:

virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-transport.cf

where mysql-trasport.cf contains:

select_field = domain
where_field = domain
additional_conditions = and active = 1

I would like to do so that a message is delivered localy only if the
'trasport' for the domain specified by the domain part of the recipient,
is the local server. Otherwise the message have to be forwarded to the
responsible post office server for the recipient domain.

So I have to add the condition:

additional_conditions = and active = 1 and
transport='smtp:host.domain.tld'

where 'host.domain.tld' is the name of local machine.

Now I would like to make safer the lookup table configuration. So I have
thought of modify the additional condition so:

additional_conditions = and active = 1 and LOWER(transport) in
('smtp:`hostname -f`', 'smtp:[`hostname -i`]')

But postfix does not interpolate the shell command.. 

Is there a way to make safer my lookup condition?

TIA,

rocsca

Reply via email to