Re: [exim] routing based on IP that submitted message

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dave Lugo
Datum:  
To: exim-users
Betreff: Re: [exim] routing based on IP that submitted message
(self-followup, adding to the archives in case someone
else needs this, and doesn't find the posting I stumbled
upon)


I found the solution in the exim-users archive,
here:

http://lists.exim.org/lurker/message/20080223.080724.b9ee5ca6.en.html

router stanza I'm using:

redirect:
driver = redirect
data = ${lookup{$sender_host_address}iplsearch{/path/to/redirect-table}}

redirect table format I'm using is:

1.2.3.4        address@???
1.2.3.0/24     address@???



From the current 4.72 docs:

iplsearch: The given file is a text file containing keys and data. A key
is terminated by a colon or white space or the end of the line. The keys
in the file must be IP addresses, or IP addresses with CIDR masks. Keys
that involve IPv6 addresses must be enclosed in quotes to prevent the
first internal colon being interpreted as a key terminator. For example:

1.2.3.4:           data for 1.2.3.4
192.168.0.0/16:    data for 192.168.0.0/16
"abcd::cdab":      data for abcd::cdab
"abcd:abcd::/32"   data for abcd:abcd::/32





On Wed, 10 Nov 2010, Dave Lugo wrote:
>
> Hi,
>
> I have a requirement to have all mail that exim
> accepts from a specified set of IPs, sent to a
> specific remote email address.
>
> I think what I need is a redirect router with a
> condition to check the connecting IP against a
> file, and then grab the dest email from the file.
>
> File would be something like:
>
> 1.2.3.0        user@???
> 2.3.4.0/24    user2@???

>
> Has anyone done this already? I'll probably dig
> through docs more this afternoon, hoping someone
> has a config snippet they can paste that I can
> reuse.
>
> Thanks!
>
> Dave
>
>


-- 
--------------------------------------------------------
  Dave Lugo     dlugo@???      No spam, thanks.
  Are you the police?  . . .  No ma'am, we're sysadmins.
--------------------------------------------------------