AuthUserReplacementIP no longer effective in 5.6

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
rstarkov
New user
New user
Posts: 26
Joined: 2013-12-30 15:51

AuthUserReplacementIP no longer effective in 5.6

Post by rstarkov » 2015-01-27 13:27

AuthUserReplacementIP used to result in a received header containing something like this: "Unknown [10.0.0.1]"

In 5.6, the code that adds this performs a reverse DNS lookup on the actual IP of the auth user, not the replacement one. Thus the real IP is still included in the header, if only indirectly via the FQDN. This makes the setting kind of pointless.

I've looked at 5.5 source code, which did this:

Code: Select all

         sReceivedLine.Format(_T("Received: %s\r\n"), Utilities::GenerateReceivedHeader(sReceivedIP, helo_host_, isAuthenticated_, start_tls_used_));
At this point, sReceivedIP was already overridden to the replacement IP, so no information about the actual IP was added to the header. 5.6 does it differently: it calls GenerateReceivedHeader_ which calls GetPTRRecords directly on the remote_ip_address_ and not on the overriden_received_ip.

Can the old behaviour be restored please? As I understand it, all that's needed is to use overriden_received_ip instead of remote_ip_address_ in GenerateReceivedHeader_.

User avatar
mattg
Moderator
Moderator
Posts: 20144
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: AuthUserReplacementIP no longer effective in 5.6

Post by mattg » 2015-01-27 14:16

That was a setting added by Bill
Martin has never really liked settings set by switches in the ini, and would rather the GUI interface included all settings.

In saying that, some of the settings still work
This one obviously doesn't.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

rstarkov
New user
New user
Posts: 26
Joined: 2013-12-30 15:51

Re: AuthUserReplacementIP no longer effective in 5.6

Post by rstarkov » 2015-01-31 16:55

Would be cool to get some indication as to what Martin or Bill think about this setting as of today. Are tested patches accepted in principle? Sounds like a very simple issue for me to get started with contributing to hMailServer - if there are no objections to getting this fixed in the first place.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: AuthUserReplacementIP no longer effective in 5.6

Post by martin » 2015-01-31 17:21

Bill isn't active in the forum any more.

Bills branch contained a lot of changes which weren't covered by automated testing. So integrating all his changes became a too big task.

If you make a patch and submit a pull request on GitHub I would include it. My only requirement is that such pull request does not contain a ton of "random" changes but only a specific new feature or bugfix. The issue with large pull request containing a lot of changes is that integrating them and making sure they are covered with documentation and automated tests than becomes too big of a task for me.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

Post Reply