[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
このメッセージは次のスレッドの一部です:
日付によるスレッドの仕分け
Tony Finch 、
2004-11-11 14:40
著者:
John P Connor
日付:
2004-11-11 14:35
UTC
To:
exim-users
題目:
[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