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

folded headers get corrupted #7

Open
ttoohey opened this issue Nov 6, 2019 · 0 comments
Open

folded headers get corrupted #7

ttoohey opened this issue Nov 6, 2019 · 0 comments

Comments

@ttoohey
Copy link

ttoohey commented Nov 6, 2019

When the following message is sent to a mailhog service, the Subject line gets the Message-ID field appended to it (and mailhog generates a new Message-ID).

telnet localhost 1025 <<EOF
HELO test
MAIL FROM: <test@example.com>
RCPT TO: <test@example.com>
DATA
From: test@example.com
To: test@example.com
Subject: Testing
Message-ID:
 <message-id@localhost>

Body
.
QUIT
EOF

The subject appears as:

Subject: Testing <message-id@localhost>

I believe the following line is the source of the problem as it is expecting headers to always have a space after them:

data/message.go

Line 299 in 024d554

} else if strings.Contains(hdr, ": ") {

Is it incorrect behaviour to omit the space after the colon when folding? Is a space after the colon required even when no folding occurs?

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

No branches or pull requests

1 participant