Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

transactional emails break when blog title is too long

Open twatzl opened this issue 2 months ago • 0 comments

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
[email protected]
mail__options__host=smtp.protonmail.ch
mail__options__port=587
mail__options__secure=false
mail__options__requiretls=true
[email protected]
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 <[email protected]> does not match header From <"asdf - asdf - asdf - asdf - asdf - asdf - asdf".

Code of Conduct

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

twatzl avatar Nov 05 '25 20:11 twatzl