fix: SMTP HELO hostname#1284
Merged
Merged
Conversation
Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
floatpanebot
previously requested changes
May 13, 2026
Member
floatpanebot
left a comment
There was a problem hiding this comment.
Hi @nanookclaw! Please fix the following issues with your PR:
- Body: Missing the
## What?or## Why?headings required by the PR template.
Formatting issues have been resolved. Thank you!
andrinoff
previously requested changes
May 14, 2026
| return "signed-" + fmt.Sprintf("%x", rb[:]), nil | ||
| } | ||
|
|
||
| // generateMessageID creates a unique Message-ID header. |
Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
Contributor
Author
|
Restored the function comment that was accidentally displaced and added a short comment for the new HELO helper in Verification rerun: git diff --check
go test ./sender
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes #1084 by using the local OS hostname for the SMTP
HELO/EHLOgreeting instead of always sendinglocalhost.Both normal message sending and calendar replies now call a shared helper that returns
os.Hostname()when available, withlocalhostkept as the fallback for hostname lookup failures or empty hostnames.Why?
Some SMTP anti-spam checks reject or penalize public clients that identify as
localhost. Sending the real client hostname matches the issue's requested behavior while preserving a safe fallback if hostname lookup is unavailable.Verification:
git diff --checkpassed.go test ./sendercould not complete locally because this environment is missinglibpcsclite(Package 'libpcsclite', required by 'virtual:world', not found); the focused hostname helper test was added but the package build reaches the existing smart-card dependency first.