Skip to content

BUG: References header can exceed 998-char SMTP line limit #1115

@andrinoff

Description

@andrinoff

Describe the bug

sender/sender.go:188:

headers["References"] = strings.Join(references, " ") + " " + inReplyTo

A long thread (deep replies, list traffic) easily produces a References line over RFC 5322's 998-octet limit. Some MTAs reject the message; others silently truncate.

Expected behavior

Fold the header at 78 chars (RFC 5322 §2.2.3) and trim oldest IDs from the middle if over the limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    In review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions