hMailServer reveals sender's geographic location

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

hMailServer reveals sender's geographic location

Post by rstarkov » 2014-01-25 02:02

When I submit an email to hMailServer via SMTP (with authentication), it includes my current IP address in the very first Received header. This was a bit of a surprise to me, although admittedly not an actual problem.

The IP address reveals the city the user is in, and users don't typically associate sending an email to someone with revealing their current location to the recipient. A closed SMTP server entirely under my control doesn't need to tell my receipients where it got the message from. Last but not least, GMail's first "Received" header doesn't do this; it simply states "Received: by 10.*.*.* with HTTP; <timestamp>".

So, does that IP address have to be there? Should it simply be removed for everyone? It doesn't serve any useful purpose as far as I can tell, short of being a privacy leak. "with HTTP" is good enough, even if a bit of a lie.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-01-25 02:31

They are there for a reason. They provide tracking info for diagnosing problems and to trace a message flow or source. So no, there is no option to not add them but there are workarounds if you want it bad enough. You could search the headers or EML & strip them but that'd be a real pain.

This does not entirely help but I added a new INI setting awhile back:
http://www.hmailserver.com/forum/viewto ... 38#p132238

hmailserver.ini

Code: Select all

[Settings]
AuthUserReplacementIP=127.0.0.1
; Tells hmail to replace AUTH'd sender's IP with this value (to help when sender IP is on public blacklist).
; X-header is added instead.
; Default is blank or use sender's real IP
Example header added if that INI is set where the IP is the AUTH'd sender's IP address that would normally go in the Rec'd headers:

Code: Select all

Received: from MyComputer (mycomputer [127.0.0.1]) by mycomputer with ESMTPSA ; Fri, 24 Jan 2014 22:34:06 -0500
X-AuthUserIP: 192.168.3.3
It replaces the user's real IP with whatever IP is set in the ini in the Rec'd headers to help people who's email is being rejected by remote servers detecting blacklisted IP's in the Rec'd headers which solves your problem BUT if set the sender's IP is added as a new header & there is no way to disable that. So the IP ends up in the headers anyway just not in Rec'd headers. But you should be able to strip the header added in rule or script if you really want to.
Bill

EDIT: Forgot about this key to not add the x-header in 1st place:

Code: Select all

[Settings]
AddXAuthUserIP=1
; Default is 1 or enabled. If set to 0 X-AuthUserIP header with user's IP will not be added.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

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

Re: hMailServer reveals sender's geographic location

Post by rstarkov » 2014-01-25 02:53

I assume you're thinking of complex setups, where additional forwarding might take place? Because in simple single-user setups (like mine), my email flow is trivial and doesn't warrant having the IP address shown.

Do you feel that the privacy issue is insignificant enough and therefore it's not worth spending time on an option that allows the address to be hidden completely?

Edit: now that this is starting to sound like a feature request, perhaps I should simply post it as one to have it processed like other requests.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-01-25 04:00

perhaps you could tell us why anyone would want to hide where they are when they are trying to communicate with someone. I would of thought that it's good etiquette not to try and hide the source of an email.

Your assumption that the IP provides the city of the sender is flawed anyway. It might and it might not.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-01-25 04:49

rstarkov wrote:I assume you're thinking of complex setups, where additional forwarding might take place? Because in simple single-user setups (like mine), my email flow is trivial and doesn't warrant having the IP address shown.

Do you feel that the privacy issue is insignificant enough and therefore it's not worth spending time on an option that allows the address to be hidden completely?

Edit: now that this is starting to sound like a feature request, perhaps I should simply post it as one to have it processed like other requests.
What the senders IP could be used for & how important it would be to prevent it from being visible to the outside world would depend on how paranoid you are. If say the user was on the LAN their IP might be 192.168.2.138 which tells outside jack squat about what country they are or much of anything else besides exposing the private IP scheme you use which isn't likely too useful to the recipient or anyone along the way. If the sender is on the outside then their public IP would be in the headers then perhaps more info is exposed & yeah possibly their general location but likely their ISP at least. Again how useful that would to someone could be argued. The fact that odds are only the recipient and their ISP would have access to the headers they likely know more info about the sender than what the IP tells them anyway. Which begs to question why would someone be paranoid enough to try & hide that info in 1st place.

That being said I highly doubt such a feature would ever be implemented. Mostly because it can likely be done with rules/scripting but also in the fact it's unlikely anyone would find it useful at least for anything legit anyway.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

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

Re: hMailServer reveals sender's geographic location

Post by rstarkov » 2014-01-25 05:21

percepts wrote:perhaps you could tell us why anyone would want to hide where they are when they are trying to communicate with someone. I would of thought that it's good etiquette not to try and hide the source of an email.
There's a difference between "try and hide" and "actively provide irrelevant information". I'm not trying to hide; the source of my email is my "From" address and my mail server; both are, and should be, in plain sight. But attaching my exact GPS coordinates would surely be over the top. Hence it's only a question of how accurate is too accurate.

To put it differently, if the people running this forum suddenly posted the IP of all users (who are trying to communicate here, so hey, we therefore should all know where everyone lives, right?), do you think the forum users would all go "meh, whatever"?

percepts wrote:Your assumption that the IP provides the city of the sender is flawed anyway. It might and it might not.
It does more often than it doesn't.

Bill48105 wrote:Which begs to question why would someone be paranoid enough to try & hide that info in 1st place.
Mainly because it feels like hMailServer is revealing something I didn't authorise it to reveal.

Bill48105 wrote:That being said I highly doubt such a feature would ever be implemented. Mostly because it can likely be done with rules/scripting but also in the fact it's unlikely anyone would find it useful at least for anything legit anyway.
Understood. I'll try it with scripts as I see you guys don't seem to think this information is ridiculously out of place in outgoing emails (not in relayed emails!), so I'll save my breath.


(Obviously anyone doing non-legit things can absolutely trivially use plain TCP to transmit whatever the heck they please, so I hope nobody is thinking this feature somehow makes it easier to do non-legit things. Plus, my mail server will be implicated anyway if I were to do something non-legit. Finally, it's not hMailServer's place to tell on its user on the off chance that they are doing something non-legit and it'll help get them caught.)

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-01-25 05:31

How about we go about this a different way. Show me a mail server (besides webmail services like hotmail/gmail since those are actually mail clients) that does not include the sender's IP address. Or show me an RFC that states a scenario or case where the sender's IP should not be included.

Look i get your point. If your server logs the sender's IP then why does it need to be in the headers so the recipient & relaying servers could see it. That's fine except the fact that last I checked the rec'd headers were there for a reason per RFC standards.

Set the INI value & use a rule or script to delete the header then it's moot point anyway as then you got your feature request.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

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

Re: hMailServer reveals sender's geographic location

Post by mattg » 2014-01-25 13:59

rstarkov wrote:The IP address reveals the city the user is in, and users don't typically associate sending an email to someone with revealing their current location to the recipient. A closed SMTP server entirely under my control doesn't need to tell my receipients where it got the message from. Last but not least, GMail's first "Received" header doesn't do this; it simply states "Received: by 10.*.*.* with HTTP; <timestamp>".
#1. 10.x.x.x. addresses are LAN addresses. Many gmail messages originate from a web server, which I'd guess is on the Gmail LAN

#2. Who use IP addresses? Anyone who uses GeoIP to limit SPAM

#3. Most mail that I see without those 'Received By' headers are typically SPAM.

#4. I certainly like to see this 'trace' included in headers

#5. RFC822 >> http://tools.ietf.org/search/rfc822

Says in part
4.3. TRACE FIELDS

Trace information is used to provide an audit trail of mes-
sage handling. In addition, it indicates a route back to the
sender of the message.
...
4.3.2. RECEIVED

A copy of this field is added by each transport service that
relays the message. The information in the field can be quite
useful for tracing transport problems.
Not sure that adding IP address is optional. Some other received fields are like hostname.
I'd suggest that adding a 'received' From IP address header is 'recommended' at every MTA
percepts wrote:perhaps you could tell us why anyone would want to hide where they are when they are trying to communicate with someone.
+1
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-01-25 14:21

Each receiving mailserver adds a received header and I'm guessing the IP it puts in there is the tcp connection IP and not something from the email. So deleting the recieved header from local account sent messages in hmail does not stop the recieving mailserver from containing a recieved header with the hmail server IP in it? Am I wrong? (assuming first and any subsequent servers don't remove recieved headers). So you can't rely on hmail to cover your tracks. Unlucky.

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

Re: hMailServer reveals sender's geographic location

Post by mattg » 2014-01-25 14:27

percepts wrote:So deleting the recieved header from local account sent messages in hmail does not stop the recieving mailserver from containing a recieved header with the hmail server IP in it?
That's the way that I see it too...
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: hMailServer reveals sender's geographic location

Post by rstarkov » 2014-01-25 15:05

mattg wrote:
percepts wrote:So deleting the recieved header from local account sent messages in hmail does not stop the recieving mailserver from containing a recieved header with the hmail server IP in it?
That's the way that I see it too...
That is correct. You can determine where my mail server is. For me, it happens to be in Canada and it doesn't move when I travel.

Anyway, while I don't understand the argument about "why would you want to hide it", I do get that the RFC says so, and that it's been there forever, and I've even checked that Postfix does this too. Was just a question/suggestion by someone new to running their own email :) I was genuinely surprised by this behaviour. Thanks for your time guys.

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

Re: hMailServer reveals sender's geographic location

Post by mattg » 2014-01-25 15:21

No problem

Just curious that this is the second time in a week that we have been asked this question.
I only remember one or two similar requests in six or so years, in both cases where the poster didn't want their internal LAN IP recorded. (there is really only three or four numbering options for LAN IPs anyway).

These headers aren't necessarily accurate, they can be spoofed, or as Bill mention above, removed as the message passes through hMailserver with a script.

Most people wouldn't know what an email header was, let alone how to read them. Most people see email headers as 'secret Geek stuff'. Perhaps I'm just old fashioned, but personally, I like that IP addresses are traceable, and that this 'route' is recorded in the headers of messages.
(But then I also like to read and keep log files...)

If I was really worried about my privacy, I'd use Message encryption (as opposed to SSL) much more than I do...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-01-25 17:52

rstarkov wrote:
mattg wrote:
percepts wrote:So deleting the recieved header from local account sent messages in hmail does not stop the recieving mailserver from containing a recieved header with the hmail server IP in it?
That's the way that I see it too...
That is correct. You can determine where my mail server is. For me, it happens to be in Canada and it doesn't move when I travel.
Well if you know it's correct that you can't hide it (i.e. it is the recieving server which sets it) then why ask, it's out of your control.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-01-25 18:44

percepts wrote:
rstarkov wrote:
That is correct. You can determine where my mail server is. For me, it happens to be in Canada and it doesn't move when I travel.
Well if you know it's correct that you can't hide it (i.e. it is the recieving server which sets it) then why ask, it's out of your control.
Think he was saying the IP of where he is currently located is shown in the header. When he travels around he logs in & sends emails & isn't so much concerned with people knowing where his server is but where HE is when he sends. He must have already turned off gps tracking on his cell phone lol
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-01-25 19:20

if you're using a cell phone or wifi then there's no telling where it came from anyway. At least not in the UK as far as I know.

A lot of this is dependant on how the networks are setup in the country you happen to be in and how the mobile network works in your vicinity. In other words the information is unreliable and anyone relying on it would be foolish at best.
On the other hand, if you want to falsify your received headers from your own server then I suppose you can.

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 06:14

I can't imagine I'll score any points with this... but I kind of agree with the idea of being able to remove originating IP information from Received chains.
Bill48105 wrote:How about we go about this a different way. Show me a mail server (besides webmail services like hotmail/gmail since those are actually mail clients) that does not include the sender's IP address.
I have never seen an MTA that allows "First Received" to be disabled, but I imagine it probably does exist somewhere. Honestly, I haven't evaluated it. <wink> Webmail on the other hand is a different beast, typical webmail providers used to include X-Originating-IP to identify sources, but people bitched and over the years individual providers have each made their own policies regarding IP disclosure. I am not on the same network as my hMailServer and as a result if I were using a "normal" mail client it could tell the recipient a bit about where I am at the time I sent a message.

I can think of a few possible scenarios under which someone may not want their location disclosed:

1. You are receiving Employment Insurance benefits from your government and as part of your eligibility you are required to remain in your country, and looking for work during business hours. You wish to break the terms of your benefits and go on vacation to Cuba for a week, but do not want to leave a trail that would allow your government to withdraw or clawback your benefit money.

2. You have a company with employees in multiple countries, but you want your clients/customers to only see your presence in one place. If this seems like a silly example to you then stop and think about the "Buy American" attitude many people in the US have. If this still seems like a silly example, try contacting eBay to ask them why their banking/billing is done in Switzerland if they are an "American company" and see what kind of response you get.

3. You run a small mail server for you and your friends on a rented VPS and simply don't want your less-technical friends to be disclosing their ISP or current general location without knowing (or even understanding what email headers are).

Each of these examples have varying degrees of legitimacy but I don't think any of them are terribly unrealistic. I think that it is fair to want your mail server to be the authoritative point of reference for externally sent mail. Having said that, I can't imagine the feature request is high on the list here... so perhaps RoundCube or SquirrelMail setup on the hMailServer box would be a quick and dirty way to hide your location (it's what I do).

HF eh. :-)
S.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-02-05 06:19

when I go on holiday I don't do email. Wouldn't be much of a holday would it.

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 06:37

percepts wrote:if you're using a cell phone or wifi then there's no telling where it came from anyway. At least not in the UK as far as I know.
My initial guess would be that if someone is using a cell phone to send mail through an hMailServer then the public IP of the cell provider is what would be in the first Received header. If using a wifi hotspot or other public wireless access point, then the public IP of the provider would be given.

Then, some might say that if you are using an iPhone, Blackberry, or Android device, the NSA and GCHQ are able to read your email, view your photos, get your GPS coords (assuming you have not turned off your GPS), read through your contacts, and see every other bit of information on your device. Ahem...

Sigh... okay I'll try to stop the political rant.
percepts wrote:when I go on holiday I don't do email. Wouldn't be much of a holday would it.
I remember when I was working for a large organization and people were having their Blackberries taken away for "cost reasons". They'd get all bent out of shape about it and complain... I never understood why they felt such a strong need to be available for their employer outside of working hours! And if it isn't email it is Facebook or Twitter. If you are able to set it aside when you go on vacation then truly good for you! I only wish more people felt the same way. People are such suckers for gadgets. :-(

S.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-02-05 06:47

I have created a new new acronym. It's ACU and I call all devices such as PCs, tablets, laptops, Iphones etc this.

It stands for Automaton Control Unit

I tried to get it into the Urban dictionary but they rejected it for some reason. :lol:

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 06:50

You gotta be kiddin' me... had no idea that Urban Dictionary even rejected entries! For real. :-)
S.

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

Re: hMailServer reveals sender's geographic location

Post by mattg » 2014-02-05 07:02

Interestingly I see in Bill's Alpha thread >> http://www.hmailserver.com/forum/viewto ... 20&start=0
This ini setting
;AuthUserReplacementIP=127.0.0.1
; Tells hmail to replace AUTH'd sender's IP with this value (to help when sender IP is on public blacklist).
; X-header is added instead.
; Default is blank or use sender's real IP
That seems to pre-date this thread too
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-05 07:19

mattg wrote:Interestingly I see in Bill's Alpha thread >> http://www.hmailserver.com/forum/viewto ... 20&start=0
This ini setting
;AuthUserReplacementIP=127.0.0.1
; Tells hmail to replace AUTH'd sender's IP with this value (to help when sender IP is on public blacklist).
; X-header is added instead.
; Default is blank or use sender's real IP
That seems to pre-date this thread too
OMG can't believe this thread woke up again lol

Funny matt look at my 1st post in this mile long thread :D

But yeah that key has existed for a long time now. I added it because mail from a client of mine was getting rejected by some servers that tested all IP's in the rec'd headers one of which was his IP obviously which happened to be on a dynamic DUN list (duh it's dynamic) and the asshats blocked on that. So I had no choice but to contact them & tell them they were fuckin idiots & to add the key when they failed to respond. lol

Anyway it would be trivial to alter the code to not add the x-header like it does & if enough people moaned & bitched & complained (oops I mean requested it nicely lol) then perhaps I could be persuaded to do so but the whole thing is stink about nothing IMO. If someone has something to hide then they should have to work to hide & not be spoon fed. IOW I added the key to solve a problem with mail delivery not to facilitate someone hiding their location. Besides, as noted way back if someone wants to remove the IP bad enough they can. Replace the IP in headers with that INI key then strip the X-header in script. Done.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-05 07:31

LMFAO Seems I can tell the future:
http://www.hmailserver.com/forum/viewto ... 70#p135570
Posted: 2012-03-03 14:44
There is actually another I added recently BUT is not in the released code yet:
Code:
[Settings]
AddXAuthUserIP=1
; Default is 1 or enabled. If set to 0 X-AuthUserIP header with user's IP will not be added.
Some people might not want that so I added the AddXAuthUserIP last week which when set to 0 means DON'T add that X-AuthUserIP header.
SOOO the stupid INI is there after all. I'd have to check official code to see if it made it but I checked my local copy & it IS so any of my experimental releases since March 2012 has that key. SO set AuthUserReplacementIP=127.0.0.1 & AddXAuthUserIP=0 & VOILA you got your wish & it's been there for almost 2 years. The rec'd headers will show 127.0.0.1 (or whatever IP you put including your server's public IP if you prefer) and the X-AuthUserIP header will not be added. It's like fricken xmas & ya don't even know it. ;)
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 07:40

Hey Guys,

I just tested this on v5.4-B1946 and it changed the header from

Code: Select all

Received: from [192.168.1.12] ([192.168.1.12]) by 69-165-220-221.dsl.teksavvy.com ; Wed, 5 Feb 2014 00:13:42 -0500
to

Code: Select all

Received: from [192.168.1.12] ([127.0.0.2]) by 69-165-220-221.dsl.teksavvy.com ; Wed, 5 Feb 2014 00:19:04 -0500
When I added this to my ini file:

Code: Select all

AuthUserReplacementIP=127.0.0.2
I then setup reverse resolution for this box but it still gave me

Code: Select all

Received: from [192.168.1.12] ([127.0.0.2]) by 69-165-220-221.dsl.teksavvy.com ; Wed, 5 Feb 2014 00:35:17 -0500
I'm too tired right now so I'll have another look in the morning (or whenever I drag my sorry ass out of bed). :-)

Thanks for the tips fellahs!
S.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-05 08:13

lol snork you worry about your IP in email header no one will see yet you post it right up on public forum for world to see. :D

btw you can thank Mr James aka rolaids0 for the new headers you are seeing. That is a patch from him to fix issues due to incomplete headers in particular for spamassassin but some ISP's test incoming emailsf or that header format where the reverse dns of their IP is added. The other IP is there because of your email client's HELO string. (Check the logs)

ANnway that was added in hmailbin-5.4-B2012020601.7z so you'd need to use an earlier build such as hmailbin-5.4-B2011120101.7z or if you want official you'd need to use 5.4 - Build 1946 which was released before I committed the changes to the SVN. Since you say you are using B1946 I find that odd since I committed the changes on Feb 12, 2013 & B1946 was released on Feb 9 2013. Maybe you'd need to try one of the older ones:
5.4 - Build 1945 No 2013-01-02 4617 Download Change log
5.4 - Build 1944 No 2012-08-08 16063 Download Change log
5.4 - Build 1942 No 2012-07-15 3142 Download Change log
5.4 - Build 1931 No 2011-08-21 23351 Download Change log
1931 was quite stable if I recall.

Otherwise I'll have to look at the function that builds the rec'd header & see safe way to alter it without borking things.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-05 08:59

OK I'm about to post a new build. If replacement IP is set in the INI the sender'd HELO string is either "localhost" if replacement is 127.0.0.1 otherwise it is "Unknown". Be warned though if ptr lookup of the replacement IP gives a result it WILL be used in the header. So for example if you use 127.0.0.1 it'll likely give your server's host name. If it does not resolve then it'll say "Unknown"

Example:

Code: Select all

Received: from Unknown (Unknown [10.1.2.3]) by SERVER with ESMTPA
If I use 127.0.0.1 it now gives:

Code: Select all

Received: from locahost (SERVER [127.0.0.1]) by SERVER with ESMTPA
The reason is that 127.0.0.1 ptr resolves to SERVER which is the test server's network name. If you don't want your server's name to be shown then use a replacement that does not resolve such as 10.1.2.3 192.168.3.33 etc Odds are you could use 127.0.0.2 even as it likely does not resolve to anything unless you've set it in HOSTS or your local dns server.

It's posted in the experimentals thread but here is a link:
http://www.mediafire.com/download/836rs ... 4020501.7z
MD5: f978e0e097d10200ca9099a3c0b4912d SHA1: 0dc02ca6a1fd17432b25d95da1f9282b39751a1d
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 15:53

Bill48105 wrote:lol snork you worry about your IP in email header no one will see yet you post it right up on public forum for world to see. :D
Ahhh Bill, you underestimate how insane I am. :-) That is the IP address of my mail server and I am not at that location, and I am also not at 192.168.1.12 either... they are both machines I have remote access to. Don't worry though, I get at them through an SSH tunnel.
Bill48105 wrote:OK I'm about to post a new build.
Dude, you are the freakin' king.

S.

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-05 19:06

Code: Select all

Received: from Unknown (Unknown [127.0.0.2]) by 69-165-220-221.dsl.teksavvy.com with ESMTPSA ; Wed, 5 Feb 2014 12:00:43 -0500
Booyeah! Thanks man, I appreciate it! :D

S.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-05 20:40

Snorkasaurus wrote:

Code: Select all

Received: from Unknown (Unknown [127.0.0.2]) by 69-165-220-221.dsl.teksavvy.com with ESMTPSA ; Wed, 5 Feb 2014 12:00:43 -0500
Booyeah! Thanks man, I appreciate it! :D

S.
That service or what. Feel free to share some beer. Since it won't fit thru the interwebs drink my share & let me know how tasty it was. :)
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

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

Re: hMailServer reveals sender's geographic location

Post by rstarkov » 2014-02-08 19:23

Awesome Bill, it works in 5.4-B1950!

Code: Select all

[Settings]
AuthUserReplacementIP=10.0.0.1
AddXAuthUserIP=0
Result:

Code: Select all

Received: from [192.168.1.100] (Unknown [10.0.0.1])
	by rstarkov.com
	; Sat, 8 Feb 2014 17:18:15 +0000
And no "X-AuthUserIP" in sight. Sending you virtual beer in my thoughts :)

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-08 19:54

rstarkov wrote:Awesome Bill, it works in 5.4-B1950!

Code: Select all

[Settings]
AuthUserReplacementIP=10.0.0.1
AddXAuthUserIP=0
Result:

Code: Select all

Received: from [192.168.1.100] (Unknown [10.0.0.1])
	by rstarkov.com
	; Sat, 8 Feb 2014 17:18:15 +0000
And no "X-AuthUserIP" in sight. Sending you virtual beer in my thoughts :)
OK cool. I assume you mean dropping the experimental build into B1950. ;)
WOW thanks for the virtual beer!
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: hMailServer reveals sender's geographic location

Post by percepts » 2014-02-08 20:08

Ah well, since ther're virtual and open source, have one on me too. :lol:

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-08 20:11

percepts wrote:Ah well, since ther're virtual and open source, have one on me too. :lol:
woo thanks i better slow down i'm feelin a little tipsy :D
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
Snorkasaurus
Normal user
Normal user
Posts: 188
Joined: 2010-08-29 16:32
Location: Canada
Contact:

Re: hMailServer reveals sender's geographic location

Post by Snorkasaurus » 2014-02-08 21:42

Ahem...

Just sayin'

Thanks Bill.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer reveals sender's geographic location

Post by Bill48105 » 2014-02-08 21:55

Snorkasaurus wrote:Ahem...

Just sayin'

Thanks Bill.
WOW thanks Snorkasaurus! Can't say I've ever had anyone say such nice things about me. :) Normally people just throw tempter tantrums when we don't cater to their every whim & call me nasty names. :D Glad it we helpful. I understand why it would be of concern but can't say I'll ever use it. But then again I don't use many hmailserver features including some I had part in getting them added. Luckily for you guys who wanted it I had already been in that part of the code not long ago & knew it'd be rather simple for me to add with little risk of breaking anything. ;)
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply