#761 ✓fixreleased
Johanna Amann

Make hostname in SMTP ehlo configurable

Reported by Johanna Amann | May 8th, 2014 @ 01:33 PM

Hi,

at the moment MailMate either sends the current hostname (or the IP address when not being able to look that up) as the hostname in the ehlo.

While I know this is good style, would it be possible to make this value configureable, or use lo0 as the outgoing device when connecting to localhost?

Background: I have a number of different accounts with differing smtp servers. For security, some of them are just reachable in the network of their institution. I have a local ssh port forward running that forwards the connection port 25 of my submission smtp server. Hence, the smtp server does not actually know my IP address. However MailMate sends it in the ehlo where it is used by the server.

Hence, when using MailMate at the moment the header received lines look like
Received: from my.real.public.hostname (my.work.server [workserver.ip]) by ...
vs (apple mail, which uses the loopback interface to connect to localhost):
Received: from IPv6:::1 by ...

It would be great to be able to choose this value and I suspect it is a really simple change. I just do not want to advertise my current location in every mail I send if it is not absolutely necessary.

Comments and changes to this ticket

  • benny

    benny May 9th, 2014 @ 12:56 PM

    • State changed from “new” to “fixcommitted”

    I'm actually not quite sure what the best behavior would be. I've tried to follow the standards, but I'm not sure it really does any good to use a meaningful IP address in the EHLO anymore. Especially not when most SMTP servers already require authentication before allowing a user to send messages.

    For now I've added the following hidden preference (untested though):

    defaults write com.freron.MailMate MmSMTPFixedIP -string "127.0.0.1"
    

    Note that [] should not be included.

    I've closed the ticket, but if anyone has an opinion (references) on the subject of default behavior then they are welcome.

  • benny

    benny October 15th, 2014 @ 03:32 PM

    • State changed from “fixcommitted” to “fixreleased”
  • Bill Cole

    Bill Cole April 25th, 2016 @ 10:16 PM

    • Tag set to ehlo, hostname, smtp

    RFC5321 and its recent ancestors allow [bracketed] IP literals in EHLO/HELO arguments when a client hostname that would be correctly meaningful to the server is unknown, but there's a clear preference for a name over an IP literal in the RFCs. Operationally, there are some mail severs which treat mail with greater distrust when it is offered on a session with an IP literal HELO argument because empirically the only SMTP clients that use IP literals are MUAs like MailMate (which usually mitigate the issue by authenticating) and spambots. While the most common use cases for MailMate do make an IP literal the best choice, it would be helpful to support the use of a proper hostname, either by allowing the user to set it explicitly with a special preference like MmSMTPFixedIP and/or by detecting when the system has a reasonable FQDN configured as its hostname, e.g. a name which doesn't end in an invalid or reserved TLD (e.g. .local, .test, etc) and resolves to an IP address that either matches an IP on a network interface OR is a public IP while the machine's network interfaces only have RFC1918 addresses (i.e. is likely to be the name of a NAT address.)

  • Bill Cole

    Bill Cole October 22nd, 2016 @ 02:47 AM

    Maybe my last comment was too verbose, as it didn't spur any response.

    Short form: It would be helpful to be able to set the HELO argument to a hostname because that is both the formally preferred behavior AND it can allow a single setting to be correct across all accounts, even when network circumstances make the client appear at different IPs to different outbound servers.

    The simplest way to do this would be to detect whether MmSMTPFixedIP is an IP address or a hostname, and if it's not an IP, skip putting the [] around it.

  • benny

    benny October 27th, 2016 @ 01:25 PM

    Here you go:

    defaults write com.freron.MailMate MmSMTPFixedHostname -string "example.com"
    

    This takes precedence over MmSMTPFixedIP (and it could replace it by manually adding [...]). I didn't want to add IPv4/IPv6 address recognition if I didn't have to.

    It's not released yet, but it should work in r5293+.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages