Heya,
I am using postfix SMTPD policy delegation for several spam related
tasks and one of the missing attributes was client_port - the TCP port
of client connecting to smtpd service. This attribute helps better
operating system detection using passive OS fingerprinting (p0f) and NAT
detection.
Because of that, I wrote a small and simple patch (attached) for 2.11
branch, which also includes client_port in the SMTPD policy delegation
request.
If somebody finds that useful, feel free to use it ;)
cheers, Jernej
--- postfix-2.11.0/src/smtpd/smtpd_check.c 2013-11-12 19:00:11.000000000
+0100
+++ postfix-2.11.0-client_port/src/smtpd/smtpd_check.c 2014-04-18
06:50:56.936861633 +0200
@@ -3599,6 +3599,7 @@ static int check_policy_service(SMTPD_ST
ATTR_TYPE_STR, MAIL_ATTR_ACT_PROTO_NAME, state->protocol,
ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, state->addr,
ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_NAME, state->name,
+ ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_PORT, state->port,
ATTR_TYPE_STR, MAIL_ATTR_ACT_REVERSE_CLIENT_NAME,
state->reverse_name,
ATTR_TYPE_STR, MAIL_ATTR_ACT_HELO_NAME,