Skip to content

[BUG] Error when enabling List-Unsubscribe header #2229

@CaoMeiYouRen

Description

@CaoMeiYouRen

Version:

  • listmonk: 4.1.0
  • OS: linux/amd64

Description of the bug and steps to reproduce:

When the List-Unsubscribe header is enabled in the configuration (m.cfg.UnsubHeader), sending messages results in the following error:

subscriber 3: 450 Invalid literal value, expected ""

Steps to Reproduce

  1. Enable the List-Unsubscribe header in the configuration.
  2. Send a message using the current setup.
  3. Observe the error message.

Expected Behavior
Messages should be sent successfully without any errors when the List-Unsubscribe header is enabled.

Actual Behavior
An error occurs when the List-Unsubscribe header is enabled, preventing the message from being sent.

Possible Cause
The issue might be related to the format or value of the List-Unsubscribe header. Specifically, the header value might not be correctly formatted or might contain invalid characters. The header is set as follows:

h.Set("List-Unsubscribe-Post", "List-Unsubscribe=One-Click")
h.Set("List-Unsubscribe", `<`+msg.unsubURL+`>`)

Screenshots:
If applicable, add screenshots to help explain your problem.

QQ截图20241231215334
QQ截图20241231215349

Activity

added and removed
bugSomething isn't working
on Jan 1, 2025
knadh

knadh commented on Jan 1, 2025

@knadh
Owner

This is strange. This is the first report of such an issue and the header is enabled by default on all installations.

What SMTP server are you using?

CaoMeiYouRen

CaoMeiYouRen commented on Jan 1, 2025

@CaoMeiYouRen
Author

Host: smtp.resend.com
Port: 587

https://resend.com/

knadh

knadh commented on Jan 5, 2025

@knadh
Owner

Any updates on this? This definitely seems SMTP-specific. You might want to write to Resend and confirm.

CaoMeiYouRen

CaoMeiYouRen commented on Jan 5, 2025

@CaoMeiYouRen
Author

Any updates on this? This definitely seems SMTP-specific. You might want to write to Resend and confirm.

I tried it today and couldn't reproduce the problem. I think we can close this issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @knadh@CaoMeiYouRen

        Issue actions

          [BUG] Error when enabling `List-Unsubscribe` header · Issue #2229 · knadh/listmonk