[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
Ez az üzenet a következő szál része:
a teljes szál-fa dátum szerinti rendezve
Tony Finch postázva
2004-11-11 14:40
Szerző:
John P Connor
Dátum:
2004-11-11 14:35
UTC
Címzett:
exim-users
Tárgy:
[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