Okay,
The best kind of list member is the one who answers his own questions!
Two things struck me after some more time reading the exim manual.
1) $address_data - how incredibly useful! In fact, one of the sample
configs had this and I didn't know what it was for. I have no excuse.
2) unseen - this can be set on the basis of an expansion!
Armed with this knowledge, I worked out the following:
forward:
driver = redirect
address_data = GET_ADDRESS_DATA
data = ${extract{mailForwardingAddress}{$address_data}}
unseen = ${if or {{match
{${extract{deliveryMode}{$address_data}}}{reply}} \
{match
{${extract{deliveryMode}{$address_data}}}{localdelivery}}} \
{true}{false}}
reply:
driver = accept
condition = ${if match
{${extract{deliveryMode}{$address_data}}}{reply} {yes}{no}}
transport = auto_reply
unseen = ${if match
{${extract{deliveryMode}{$address_data}}}{localdelivery} {true}{false}}
localdelivery:
driver = accept
transport = local_delivery
condition = ${if match
{${extract{deliveryMode}{$address_data}}}{localdelivery} {yes}{no}}
It does exactly what I want. I am also doing a similar thing for the
catchall, but I won't have autoreply enabled for a catchall. That would
be silly.
I've been working on exim configs for 16 hours a day for the past three
days. I think I'm getting the hang of it now.
Anyone want to review my config when I'm done? I'll be using this in a
large system and don't want there to be any performance or security
holes.
I'd rather not just post it to the list as not everyone will be
interested.
Nathan.
--
Nathan Ollerenshaw - Unix Systems Engineer
ValueCommerce -
http://www.valuecommerce.ne.jp/