[exim] Conditional routing based on source IP
Català
Dansk
Deutsch
Ελληνικά
English
Español
suomi
Français
Galego
magyar
Italiano
日本語
Nederlands
Polski
Português
Português Brasileiro
Diese Nachricht ist Teil des folgenden Threads:
Der komplette Thread sortiert nach Datum
Tony Finch am
2004-11-11 14:40
Autor:
John P Connor
Datum:
2004-11-11 14:35
UTC
To:
exim-users
Betreff:
[exim] Conditional routing based on source IP
Hi
I want to route some mail based on the sending server's IP address. I
know I can do this using a condition like this:
${if {lookup{$sender_host_address}lsearch{/usr/exim/route_by_ip}}{yes}{no}}
on the router. This works fine, but it means that I have to list all the
individual IPs in my file. I'd rather use CIDR notation in the file to
specify ranges and it occurred to me to try something like this:
${if
{lookup{${mask:$sender_host_address/28}}lsearch{/usr/exim/route_by_ip}}{yes}{no}}
but, of course, this fails when the masks are different. Does anyone
have any ideas on how to do this neatly?
Cheers
John