albertito / chasquid

SMTP (email) server with a focus on simplicity, security, and ease of operation [mirror]
https://blitiri.com.ar/p/chasquid/
Other
870 stars 58 forks source link

[smtp-check]: Some MTA do reject client connections unless the local name looks like an fqdn #37

Closed znerol closed 1 year ago

znerol commented 1 year ago

The golang net/smtp package defaults to localhost for the EHLO local name unless specified otherwise using the c.Hello func.

Some MTA do reject client connections unless the local name at least looks like an fqdn. Extract from a sample run:

2023/07/14 16:08:19 === MX: 10  [...].
2023/07/14 16:08:19 SPF pass for [...]: matched ip
2023/07/14 16:08:24 TLS error: 550 Server name localhost is not a FQDN.
Please contact your ISP or system adminstrator.
2023/07/14 16:08:24 Allowed by policy
albertito commented 1 year ago

Thanks a lot for sending this!

It looks good to me. I merged it to the next branch, with some minor amends:

Can you please check ad0dbb9cdada840abf5040686677af40ec95c4a2 and confirm you're okay with this?

Thanks again!

znerol commented 1 year ago

Perfect! Thanks a lot.