strip off first senders IP and PC-Name?

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
User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-04 09:45

Hi Guys. I am a novice user of hmailserver, lets say an absolute beginner.

I noticed that in sent emails there is still the original senders (my) IP-Address and computer name shown.
I found no option to disable that.
Can that be done only by scripts in hmailserver? And if so, is there an easy script for that purpose, to just remove the originating IP and Name?

TIA
Bob

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

Re: strip off first senders IP and PC-Name?

Post by mattg » 2020-10-04 11:13

What are you hoping will be achieved by removing that detail?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

Re: strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-04 11:18

Some more privacy. I also read that most other servers would remove that by default.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 11:23

How is a pc name and internal ip address in any way a risk. They mean nothing to nobody outside of your business. Efforts to remove will be way more than any benefit you will receive (which are likely to be none).

This is standard information from most email clients sms is there for a reason (abtispam measures and tracking). Once it has been received by and left your local mta or relay it's meaningless.

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 11:26

Bob.Dig wrote:
2020-10-04 11:18
Some more privacy. I also read that most other servers would remove that by default.
I'm not sure about that. 'Received from' headers are required as part of the journey.
Received: from 10.253.62.164 by atlas207.free.mail.gq1.yahoo.com with HTTP; Sat, 3 Oct 2020 11:20:16 +0000
Received: from 185.58.86.106 (EHLO eu-smtp-delivery-106.mimecast.com) by 10.253.62.164 with SMTPs; Sat, 3 Oct 2020 11:20:16 +0000
Received: from nbs.int (185.246.48.51 [185.246.48.51]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-249-MZnt18YbPumHuUIh1ciJIQ-8; Sat, 03 Oct 2020 12:20:10 +0100
X-Originating-Ip: [185.58.86.106]
Received: from dcd-12 ([10.103.10.10]) by dcbackend-16.iol.local with LMTP id oOxOGlqZ3lodvwAAX2zSgQ for <jeff@libero.it>; Tue, 24 Apr 2018 04:41:30 +0200
Received: from dcp-13.iol.local ([10.103.10.10]) by dcd-12 with LMTP id +D4xGlqZ3loWwQAAo7Ek4Q ; Tue, 24 Apr 2018 04:41:30 +0200
Received: from libero.it ([10.103.10.10]) by dcp-13.iol.local with LMTP id 0ORgF1qZ3lohtwEAd3ayEQ ; Tue, 24 Apr 2018 04:41:30 +0200
Received: from mail2.libero.clab.contactlab.it ([93.94.33.181]) by smtp-10.iol.local with SMTP id AntafEuVZfAnOAntafoh3m; Tue, 24 Apr 2018 04:41:30 +0200
Received: from [172.16.6.30] ([172.16.6.30:33002]) by t.contactlab.it (envelope-from <7507304318.20104.2002624@t.contactlab.it>) (ecelerity 3.5.10.45038 r(Core:3.5.10.0)) with ECSTREAM id 15/BA-26916-F66EDDA5; Mon, 23 Apr 2018 15:58:07 +0200
[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

Re: strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-04 11:36

It is not a risk, although it might not be an internal IP, if I am outside or there is an external user. Also the PC-Name could be potentially embarrassing.
I have read that most server will strip that information anyway and the first hop in the header will be the sending mailserver itself.

From your answers it is obvious, that it is not a builtin feature of hmailserver.
So is there a script doing that and only that for sending mail?

Never used scripts with hmail before, had no usecase.
Last edited by Bob.Dig on 2020-10-04 11:41, edited 1 time in total.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 11:39

There is not a script but you can write one. However, how do you tell a script when an address is a pc and address and when it's not?

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 12:13

Well, people also black-out their licence plates on their cars when posting pictures ... :roll:
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 12:20

SorenR wrote:
2020-10-04 12:13
Well, people also black-out their licence plates on their cars when posting pictures ... :roll:
Thats usually to stop personal identification. "My name is jeff Smith and my number plate is....". Away you go with your cloning.

Similarly i wouldn't want my number plate to my car make on the front of a criminal's who is driving the same type. I don't want his penalties.

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

Re: strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-04 12:23

SorenR wrote:
2020-10-04 12:13
Well, people also black-out their licence plates on their cars when posting pictures ... :roll:
With good reasons. I use my mail server where I could use some "trashmail" service, but they are sometimes blocked and stuff. Not every email have to contain "personal" information about me. And also they are unencrypted (although I like that new approach from thunderbird with its pgp integration), but you know this stuff. 8)

User avatar
johang
Senior user
Senior user
Posts: 348
Joined: 2008-09-01 09:20

Re: strip off first senders IP and PC-Name?

Post by johang » 2020-10-04 13:46

Bob.Dig wrote:
2020-10-04 12:23
SorenR wrote:
2020-10-04 12:13
Well, people also black-out their licence plates on their cars when posting pictures ... :roll:
With good reasons. I use my mail server where I could use some "trashmail" service, but they are sometimes blocked and stuff. Not every email have to contain "personal" information about me. And also they are unencrypted (although I like that new approach from thunderbird with its pgp integration), but you know this stuff. 8)
you could always setup an email client directly on same machine as your hmailserver, use rdp or other method to reach it graphically and then send from mailserver itself ( providing your mailserver does not have an embarrasing name also :wink: )
___________________________________________________________end of the line

User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

Re: strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-04 14:45

So I filed a feature requests. :wink:

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 20:32

jimimaseye wrote:
2020-10-04 12:20
SorenR wrote:
2020-10-04 12:13
Well, people also black-out their licence plates on their cars when posting pictures ... :roll:
Thats usually to stop personal identification. "My name is jeff Smith and my number plate is....". Away you go with your cloning.

Similarly i wouldn't want my number plate to my car make on the front of a criminal's who is driving the same type. I don't want his penalties.

[Entered by mobile. Excuse my spelling.]
He could have seen on the streets... If you hide your license plate while driving you get a fine! :mrgreen:

In Denmark you can only get the name/address of the owner if the owner have a loan with the car as collateral OR you work for the police.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 21:00

Bob.Dig wrote:
2020-10-04 14:45
So I filed a feature requests. :wink:
To remove this line?

Code: Select all

Received: from [192.168.0.61] (sr-acer.MYDOMAIN.TLD [192.168.0.61]) by mx.MYDOMAIN.TLD with ESMTPSA (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256) ; Sun, 4 Oct 2020 20:45:01 +0200
I sent an email to my gmail account and found this in the source.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 21:07

Oh well :mrgreen:

https://www.hmailserver.com/forum/viewtopic.php?t=27711

I can confirm this setting is doing NOTHING in 5.6.8.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 21:23

Hmm... Well, not nothing but it's not an improvement :roll:

Code: Select all

Received: from [192.168.0.61] (sr-acer.MYDOMAIN.TLD [10.0.0.1]) by mx.MYDOMAIN.TLD with ESMTPSA (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256) ; Sun, 4 Oct 2020 21:17:25 +0200
X-AuthUserIP: 192.168.0.61
"X-AuthUserIP" is new... :shock:

INI-file:

Code: Select all

[Settings]
AuthUserReplacementIP=10.0.0.1
Hint:
SMTPMessageHeaderCreator.cpp around line 46'ish
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 21:40

SorenR wrote:
2020-10-04 20:32
He could have seen on the streets... If you hide your license plate while driving you get a fine!
He could, yes. But you were talking about people posting pictures on the internet. Seeing my car being driven on the streets doesn't broadcast my name and will be to a limited audience whereas posting in the internet is very much a different affair.

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 23:00

jimimaseye wrote:
2020-10-04 21:40
SorenR wrote:
2020-10-04 20:32
He could have seen on the streets... If you hide your license plate while driving you get a fine!
He could, yes. But you were talking about people posting pictures on the internet. Seeing my car being driven on the streets doesn't broadcast my name and will be to a limited audience whereas posting in the internet is very much a different affair.

[Entered by mobile. Excuse my spelling.]
I am on a couple of car forums... Named persons post pictures of their cars with blacked out license plates... Well... I already know where they live, I can go to their parking area and read it myself :mrgreen:

An email from john.doe@mydomain.tld sent from johns-pc.mydomain.tld [10.0.0.1] by mail.mydomain.tld [10.0.0.2] cannot come as a big surprise ... :roll:
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

User avatar
jimimaseye
Moderator
Moderator
Posts: 8777
Joined: 2011-09-08 17:48

Re: strip off first senders IP and PC-Name?

Post by jimimaseye » 2020-10-04 23:05

SorenR wrote:
2020-10-04 23:00
An email from john.doe@mydomain.tld sent from johns-pc.mydomain.tld [10.0.0.1] by mail.mydomain.tld [10.0.0.2] cannot come as a big surprise ...
Thats exactly my point too. The point being that 10.0.0.2 means nothing to anyone outside his LAN and tells no one anything meaningful. As for "embarrassing pc name" - to who? The man sending? Change it then! (Or leave it and give your recipients a laugh.... if they really are looking so closely and care)

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 3826
Joined: 2006-08-21 15:38
Location: Denmark

Re: strip off first senders IP and PC-Name?

Post by SorenR » 2020-10-04 23:13

jimimaseye wrote:
2020-10-04 23:05
SorenR wrote:
2020-10-04 23:00
An email from john.doe@mydomain.tld sent from johns-pc.mydomain.tld [10.0.0.1] by mail.mydomain.tld [10.0.0.2] cannot come as a big surprise ...
Thats exactly my point too. The point being that 10.0.0.2 means nothing to anyone outside his LAN and tells no one anything meaningful. As for "embarrassing pc name" - to who? The man sending? Change it then! (Or leave it and give your recipients a laugh.... if they really are looking so closely and care)

[Entered by mobile. Excuse my spelling.]
john.doe could be sending the email away from home using a public IP address... I have used a lot of sites to check my firewall and mailserver etc. and they all claim to know where in Denmark I am... The closest was 75 kilometers away :mrgreen:

PS... Denmark is not really that big :wink:
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

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

Re: strip off first senders IP and PC-Name?

Post by mattg » 2020-10-05 01:24

Thinking obtusely... I'm wondering if i should spam score a mail message without a chain of received from, with a suitably named originator...

(That would indicate to me that they are hiding something, and therefore may by dodgy)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 2178
Joined: 2017-09-12 17:57

Re: strip off first senders IP and PC-Name?

Post by palinka » 2020-10-05 02:41

mattg wrote:
2020-10-05 01:24
Thinking obtusely... I'm wondering if i should spam score a mail message without a chain of received from, with a suitably named originator...

(That would indicate to me that they are hiding something, and therefore may by dodgy)
Judging by this thread and several others, there are non-spam users that would like to erase that tiny bit on non-identifying identity. On the other hand, there are probably more spammers trying to do the same thing for one reason or another.

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

Re: strip off first senders IP and PC-Name?

Post by mattg » 2020-10-05 07:53

I went back and looked through the last few days of headers of messages received at my server

many, many mailing lists don't show this info (Some of this spam, some is not)
Many messages have a single received from header

Mail from any LAN user on my system shows as from my WAN IP address
This must be a feature of the loopback on my LAN

@Bob.Dig what firewall router do you use?
Perhaps the local IP part can be fixed by playing with your loopback and NAT settings on that device

Machine name still comes through
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Bob.Dig
New user
New user
Posts: 26
Joined: 2020-06-29 09:18
Location: Berlin

Re: strip off first senders IP and PC-Name?

Post by Bob.Dig » 2020-10-05 08:17

mattg wrote:
2020-10-05 07:53
many, many mailing lists don't show this info (Some of this spam, some is not)
Many messages have a single received from header

Perhaps the local IP part can be fixed by playing with your loopback and NAT settings on that device

Machine name still comes through
Thanks for looking!
But this wouldn't "fix" anything, the local IP is the least worrisome, machine name and/or the external IP of the potential user is.

In another (german) forum there was the discussion about email containing the original senders IP and everyone said it doesn't. I remembered mine does and every knowledgeable person there said, that I don't run a good server then.

And for spam defeating, it always will be the responsibility of the originating email-server and not a single client, at least that is how I had understand it till now.

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

Re: strip off first senders IP and PC-Name?

Post by mattg » 2020-10-05 08:40

gmail and Outlook.com certainly both show originating IP address and machine name (when not using their webmail portal)
Does that mean that both of these services aren't good servers 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

Post Reply