[exim] string expansion of $received_ip_address and $receive…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jason_Meers
Päiväys:  
Vastaanottaja: exim-users@exim.org
Aihe: [exim] string expansion of $received_ip_address and $received_port
Hi All,

I've been doing some testing in a non-live environment and wanted to use
"$received_ip_address" and "$received_port" to watch what was happening
on my system. Basically I want to have one system that behaves
differently depending on which port the message is received on.

Background:
The idea is to develop a config that could determine which MX record had
been used to make the initial connection (by getting the firewall to
forward the SMTP conversation to different ports on the same server,
based on the IP address the connection initially came in on).
This would avoid having to have a dedicated box and dedicated config for
each MX preference.

I received the following errors when trying to use this (as a text
string, not as value to compare) in a system filter or header_add statement:

unknown variable name "received_port"

(Yes I am using the correct $ prefix such as $received_port or
$received_ip_address and tried spelling received with both an "ei" and
an "ie" just to make sure).

The docs say:

"As soon as an Exim server starts processing an incoming TCP/IP
connection, this variable is set to the address of the local IP
interface, and $received_port is set to the local port number."


The following variables expand as expected for me:
$sender_address_domain
$sender_fullhost
$sender_helo_name
$sender_host_address
$sender_host_name
$sender_host_port

The following variables don't expand as expected and generate an error
for me:
$received_port
$received_ip_address

I'm using Exim 4.63 on Centos 5.1 (read that as RedHad Enterprise Linux
5 update 1)

Are these values only available for comparison in tests, or can they be
used as strings in lines of text too?


I'm not sure if Exim is just not doing what I expected, or if I'm just
not doing what Exim expected.
Any help would be appreciated.

Thanks
Jason_Meers