[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
Wiadomość jest częścią wątku:
pełne drzewo wątku posortowane wg daty
Tony Finch at
2004-11-11 14:40
Autor:
John P Connor
Data:
2004-11-11 14:35
UTC
Dla:
exim-users
Temat:
[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