When host initiate an SMTP session it have to send HELO/EHLO
request. That request contains hostname as host know it. In your case there is My-iMac
.
Here the quote from the wikipedia:
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.org
S: 250 Hello relay.example.org, I am glad to meet you
C: MAIL FROM:<bob@example.org>
S: 250 Ok
C: RCPT TO:<alice@example.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@example.org>
C: To: "Alice Example" <alice@example.com>
C: Cc: theboss@example.com
C: Date: Tue, 15 January 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection}
Little advise: you definitely shouldn't use IP addresses 12.12.12.12 or else. Allowed for private use ranges are: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
When the client is behind a NAT/Router the IP address is the external IP address. – marsh-wiggle – 2014-12-20T15:08:50.963
Oh, I've thought you have copypasted asis... – Kondybas – 2014-12-20T15:16:11.400
Sorry, 12.12.12.12 was just a dummy external IP. Is there a way to not show my machine name? I guess, to somehow disallow my host resolving it (or just for emails, if possible)? – Kar – 2014-12-20T15:31:17.967
1In short - you can't. Providing your hostname is mandatory and most SMTP-servers checks whether it is real. If no - they think that sender is a spammer. Some servers can allow to use fake hostname if authorization passed but that is not an usual behaviour. – Kondybas – 2014-12-20T15:39:12.453
@Kondybas how can a mail server check if the hostname in a private network behind natting is correct? – marsh-wiggle – 2014-12-20T15:59:14.923
In your case probably it just know that your real IP-address is in the ISP's dynamic range and doesn't perform further checks. But in the message headers it place the name your host provided as
HELO
– Kondybas – 2014-12-20T16:14:30.160Of course you can't hide the data from the sending server, but that doesn't seem to be what the question is about. It is asking for a way to not have the headers revealing personal information, which likely also includes client software versions and other data that is better kept private, not be included when sending mail to other servers. – Paul – 2014-12-20T17:57:31.850