Skip to content

transactional emails break when blog title is too long #25362

@twatzl

Description

@twatzl

Issue Summary

When choosing a longer blog title like "asdf - asdf - asdf - asdf - asdf - asdf - asdf", transactional emails will break and not work for some mail providers, because the address in the from field and envelope do not match.

Email provider used: protonmail (paid plan)

Setup:

using the docker compose setup. just starting db and ghost service.
(files shortened for better readability

  ghost:
    # Do not alter this without updating the Tinybird Sync container as well
    image: ghost:${GHOST_VERSION:-6-alpine}
    restart: always
    ports:
      - "2368:2368"
    # This is required to import current config when migrating
    env_file:
      - .env
    environment:
      NODE_ENV: production
      url: http://localhost:2368
    ...

.env file

mail__transport=SMTP
mail__from=example@proton.me
mail__options__host=smtp.protonmail.ch
mail__options__port=587
mail__options__secure=false
mail__options__requiretls=true
mail__options__auth__user=example@proton.me
mail__options__auth__pass=<smtp token>

Steps to Reproduce

  1. create a blank setup using docker compose
  2. login to admin panel
  3. change title of blog to asdf - asdf - asdf - asdf - asdf - asdf - asdf
  4. logout
  5. go again to the login screen
  6. enter email
  7. click forgot password
  8. now you get an error 550 "Submission not allowed for messages in which MAIL FROM <...> does not match header"

if you shorten the title to "asdf - asdf - asdf" suddenly the emails will work again.

Ghost Version

docker-compose 6-alpine

Node.js Version

bundled one

How did you install Ghost?

docker-compose

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

Failed to send email. Reason: Message failed: 550 5.7.26 Submission not allowed for messages in which MAIL FROM <example@proton.me> does not match header From <"asdf - asdf - asdf - asdf - asdf - asdf - asdf".

Code of Conduct

  • I agree to be friendly and polite to people in this repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs:triage[triage] this needs to be triaged by the Ghost team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions