Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smtp logger #3339

Merged
merged 5 commits into from
Oct 5, 2023
Merged

Smtp logger #3339

merged 5 commits into from
Oct 5, 2023

Conversation

nimjor
Copy link
Contributor

@nimjor nimjor commented Oct 4, 2023

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:
Ensures built-in SMTP server for generating alerts uses GoAlert's structured logger instead of stdout from go-smtp's Server type. Filters out excessive logging of ECONNRESET errors that result from common TCP probe healthchecks from load balancers--see emersion/go-smtp#236

Which issue(s) this PR fixes:
Fixes #3335

Out of Scope:
N/A

Screenshots:
N/A

Describe any introduced user-facing changes:
N/A

Describe any introduced API changes:
N/A

Additional Info:
Once emersion/go-smtp handles zero-byte connections without logging an error, the conditional filter added here can be removed.

smtpsrv/server.go Outdated Show resolved Hide resolved
smtpsrv/server.go Outdated Show resolved Hide resolved
@mastercactapus mastercactapus merged commit 51eec74 into target:master Oct 5, 2023
7 checks passed
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.

Excessive log noise from go-smtp dependency due to AWS Load Balancer healthchecks
3 participants