Skip to content

Allow configuring EHLO hostname in SMTP settings #283

@freezerxp

Description

@freezerxp

Currently, it appears that the EHLO hostname is hardcoded in sendRawEmailWithSettings:

hostname := "localhost"
code, err = smtpConn.sendCommandMultiline(fmt.Sprintf("EHLO %s", hostname))

Because of this, as far as I understand, the SMTP client always identifies itself as:

EHLO localhost

which then appears in message headers as:

helo=localhost

In some SMTP server configurations this can affect how outgoing messages are processed. In our case DKIM signing on the SMTP server was not applied when the connection used EHLO localhost, while the same server signs messages correctly when a proper hostname is used.

It would be helpful to allow configuring the EHLO hostname in SMTP settings instead of hardcoding localhost.

For example, Listmonk exposes this as a configurable field in its SMTP settings, allowing administrators to specify the hostname used in the EHLO command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions