nextcloud / nextcloud/server

Wrong sender email address when using Docker image

Open
#25,162 18 comments 6 reactions 1 assignee View on GitHub

@joshtrichards is already working on this.

Since Jan 4, 2025.

3. to review feature: emails papercut technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
Steps to reproduce
  1. Install nextcloud from Docker - using 'nextcloud' image
  2. Configure SMTP
  3. Send testing mail
Expected behaviour

Mail should arrive

Actual behaviour

A problem occurred while sending the email. Please revise your settings. (Error: Address in mailbox given [cloud@gunzo.eu@localhost.localdomain] does not comply with RFC 2822, 3.6.2.)

Server configuration

Operating system: Docker

Web server: Apache

Database: MariaDB

PHP version: From docker image

Nextcloud version: 20.0.5

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Docker

Config.php:
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'smtp.eu.mailgun.org',
'mail_smtpport' => '587',
'mail_smtpsecure' => 'tls',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpname' => 'postmaster@gunzo.eu',
'mail_smtppassword' => 'xxxxx',
'mail_from_address' => 'cloud',
'mail_domain' => 'gunzo.eu',

docker-compose.xml:

version: '2'

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=nextcloud654
      - MYSQL_PASSWORD=xxx
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8092:80
    links:
      - db
    volumes:
      - ./data:/var/www/html
    environment:
      - MYSQL_PASSWORD=xxx
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - SMTP_HOST=smtp.eu.mailgun.org
      - SMTP_SECURE=tls
      - SMTP_PORT=587
      - SMTP_AUTHTYPE=LOGIN
      - SMTP_NAME=postmaster@gunzo.eu
      - SMTP_PASSWORD=xxxx
      - MAIL_FROM_ADDRESS=cloud@gunzo.eu
      - MAIL_DOMAIN=gunzo.eu

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.