Skip to content

Conversation

piksel
Copy link
Member

@piksel piksel commented Oct 13, 2022

Adds the clienthost property that can be used to send a specific host name during the initial HELO/EHLO greeting phase. It can also be set to auto to use the OS hostname as the client host name.

Solves connections to smtp-relay.gmail.com which soft-requires the name to be non-generic:
support.google.com/a/answer/2956491

This will also handle and log when the initial response from the server isn't valid, giving a better error message in these cases.

Fixes #270

This will also handle and log when the initial response from the server
isn't valid, giving a better error message in these cases.
@piksel piksel added the Service: SMTP Related to the SMTP service label Oct 13, 2022
@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Base: 77.96% // Head: 78.49% // Increases project coverage by +0.52% 🎉

Coverage data is based on head (45f2414) compared to base (af75ade).
Patch coverage: 84.61% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
+ Coverage   77.96%   78.49%   +0.52%     
==========================================
  Files          96       96              
  Lines        2900     2934      +34     
==========================================
+ Hits         2261     2303      +42     
+ Misses        467      462       -5     
+ Partials      172      169       -3     
Impacted Files Coverage Δ
internal/testutils/textconfaker.go 0.00% <0.00%> (ø)
pkg/services/smtp/smtp_config.go 100.00% <ø> (+12.90%) ⬆️
pkg/services/smtp/smtp.go 87.41% <78.94%> (+5.40%) ⬆️
pkg/services/smtp/smtp_failures.go 91.11% <90.90%> (-0.89%) ⬇️
pkg/services/smtp/smtp_encmethod.go 87.50% <0.00%> (+25.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@piksel piksel merged commit 4a5ee05 into main Oct 15, 2022
@piksel piksel deleted the feat/smtp-clienthost branch October 15, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service: SMTP Related to the SMTP service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot send messages through SMTP servers requiring non-generic client hosts
1 participant