Skip to content

Conversation

MennoTammens
Copy link

@MennoTammens MennoTammens commented Apr 19, 2024

Description (*)

Laminas SMTP Transport Options has the option to set the name of the local client hostname, this is the name the client uses to identify itself to the mail server (HELO command).
The default setting is localhost, but some spam filters don't like that (SpamAssassin rule HELO_LOCALHOST)

This patch uses the hostname of the website as name in the SmtpOptions.

Manual testing scenarios (*)

  1. Send test mail
  2. Open the mail headers
  3. Before this patch:
    Received: from localhost (real.host.name [1.2.3.4]) by mx.mail.server;
  4. With this patch:
    Received: from store.host.name (real.host.name [1.2.3.4]) by mx.mail.server;

Questions or comments

Should this be configurable? Are there situations where this solution is worse than localhost?

@vseager
Copy link

vseager commented Jan 29, 2025

This is essential for some services such as Google SMTP relay too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants