A problem occurred while sending the email. Please revise your settings does not comply with RFC 2822, 3.6.2.) in owncloud 10.3.0

Steps to reproduce

  1. Upgrade owncloud from 10.0.7 --> 10.3.0
  2. Email setting, update the email id
  3. Send email

Expected behaviour

test email should be fired

Actual behaviour

getting error of RFC 2822

Server configuration

AWS HVM

Web server:
Apache
Database:
mysql 5.6

PHP version:
php 7.1
ownCloud version: (see ownCloud admin page)
v10.3.0
Updated from an older ownCloud or fresh install:
older owncloud
Where did you install ownCloud from:
owncloud zip packet
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here. https://gist.github.com/singhrohit003/fe6ee2448d56ec28854d1b783b96b022

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder
 "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "xx.xx.com",
            "xx.xx.digital",
            "IP"
        ],
        "asset-pipeline.enabled": true,
        "datadirectory": "\/opt\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/DNS\/index.php",
        "dbtype": "mysql",
        "version": "10.3.0.4",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "instanceid": "ocsrpu6y5yzp",
        "mail_smtpmode": "php",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpdebug": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 3,
        "mail_smtpauthtype": "LOGIN",
        "knowledgebaseenabled": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "updatechecker": true,
        "ldapIgnoreNamingRules": false,
        "maintenance": false,
        "mail_domain": "***REMOVED SENSITIVE VALUE***"
    }
}

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.
 activity: 2.5.0
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.5.0
  - encryption: 1.4.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_external_s3: 1.0.0
  - files_mediaviewer: 1.0.0
  - files_pdfviewer: 0.11.0
  - files_sharing: 0.12.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firstrunwizard: 1.2.0
  - gallery: 16.1.1
  - market: 0.5.0
  - notifications: 0.5.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - updatenotification: 0.2.1

Are you using external storage, if yes which one: s3

Are you using encryption: yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:
All
Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

Hi,

what email address are you trying to use?

you can obscure your private information by writing like "example@foo.bar

I don’t quite understand what you mean with:

Do you mean “From address”?

I have a similar problem. After updating, sending emails using PHP ends with error 220.
It worked fine before the upgrade.

Can you have a look in the logs? There must be more than just error 220

owncloud.log or apache log?
I didn’t find anything interesting.

Both, though more likely owncloud.log, perhaps you have to increase the log level.

What are your current email settings?

Current settings for sending e-mails: php method.

This method worked well before upgrading.

I didn’t make any changes to the server.

The log level is the most detailed including debug mode.

In log:

{“reqId”:“XbLxWGFb35BDzchF8rlq0AAAAMI”,“level”:0,“time”:“2019-10-25T14:58:00+02:00”,“remoteAddr”:“IP_ADDRESS”,“user”:“administrator”,“app”:“OC\User\Session::validateToken”,“method”:“POST”,“url”:"/index.php/settings/admin/mailtest",“message”:“token TOKEN_NUMBERS with token id 9629 found, validating”}
{“reqId”:“XbLxYGFb35BDzchF8rlq0wAAANY”,“level”:0,“time”:“2019-10-25T14:58:08+02:00”,“remoteAddr”:“IP_ADDRESS”,“user”:“administrator”,“app”:“OC\User\Session::validateToken”,“method”:“GET”,“url”:"/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",“message”:“token TOKEN_NUMBERS with token id 9629 found, validating”}

Did you upgrade to 10.3?

Yes.
version 10.3.0.4
versionstring 10.3.0

hello dmitry,

I am using rohit.singh@companyname.com. It use to work with my earlier version. But it has stopped working since I upgraded to 10.3

Hello Eneubauer,

settings --> general --> email setting --> send mode “php” and from address “rohit.singh”@“companyname.com” I have remove my email extesnion. but its my companyname.com

yes, this issue started after upgrading to 10.3.

Hi,

I’m sorry but I am unable to reproduce your issue. I even downgraded my PHP to version 7.1 but I’m still unable to get this error message.
Do you have all required php modules installed and enabled?

root@ubuntu1804:/var/www/owncloud# php -m
[PHP Modules]
apc
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libsmbclient
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
sockets
SPL
ssh2
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

root@ubuntu1804:/var/www/owncloud# dpkg -l | grep php
ii  libapache2-mod-php7.1                 7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        server-side, HTML-embedded scripting language (Apache 2 module)
[...]
ii  php-apcu                              5.1.17+4.0.11-1+ubuntu18.04.1+deb.sury.org+1             amd64        APC User Cache for PHP
ii  php-apcu-bc                           1.0.5-1+ubuntu18.04.1+deb.sury.org+1                     amd64        APCu Backwards Compatibility Module
ii  php-common                            2:69+ubuntu18.04.1+deb.sury.org+2+php7.3                 all          Common files for PHP packages
ii  php-igbinary                          3.0.1+2.0.8-1+ubuntu18.04.1+deb.sury.org+1               amd64        igbinary PHP serializer
ii  php-imagick                           3.4.4-1+ubuntu18.04.1+deb.sury.org+1                     amd64        Provides a wrapper to the ImageMagick library
ii  php-pear                              1:1.10.8+submodules+notgz-1+ubuntu18.04.1+deb.sury.org+1 all          PEAR Base System
ii  php-redis                             5.0.2+4.3.0-2+ubuntu18.04.1+deb.sury.org+1               amd64        PHP extension for interfacing with Redis
ii  php-smbclient                         1.0.0-1+ubuntu18.04.1+deb.sury.org+1                     amd64        PHP wrapper for libsmbclient
ii  php-ssh2                              1.1.2+0.13-5+ubuntu18.04.1+deb.sury.org+1                amd64        Bindings for the libssh2 library
ii  php7.1                                7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.1-cli                            7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        command-line interpreter for the PHP scripting language
ii  php7.1-common                         7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        documentation, examples and common module for PHP
ii  php7.1-curl                           7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        CURL module for PHP
ii  php7.1-gd                             7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        GD module for PHP
ii  php7.1-imap                           7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        IMAP module for PHP
ii  php7.1-intl                           7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        Internationalisation module for PHP
ii  php7.1-json                           7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        JSON module for PHP
ii  php7.1-ldap                           7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        LDAP module for PHP
ii  php7.1-mbstring                       7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        MBSTRING module for PHP
ii  php7.1-mysql                          7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        MySQL module for PHP
ii  php7.1-opcache                        7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        Zend OpCache module for PHP
ii  php7.1-readline                       7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        readline module for PHP
ii  php7.1-xml                            7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.1-zip                            7.1.33-1+ubuntu18.04.1+deb.sury.org+1                    amd64        Zip module for PHP
[...]

You might not need all the listed ones above, but I just pasted them here for you to quickly be able to compare.
These are the screenshots I get with my upgraded ownCloud version 10.3 (but downgraded PHP to 7.1):
Screenshot_20191029_144042

If I try to use an invalid email address, this is how the error message looks like:
Screenshot_20191029_144115

BTW, your full email address is still visible in the screenshot you uploaded, not in the “From address” fields, but in the red error message below. You might want to redact that.

thanks eneubauer,

below are list of php installed
php71-pecl-raphf-2.0.0-4.1.amzn1.x86_64
php71-enchant-7.1.32-1.42.amzn1.x86_64
php71-imap-7.1.32-1.42.amzn1.x86_64
php71-pecl-http-devel-3.1.0-6.2.amzn1.x86_64
php71-pecl-raphf-devel-2.0.0-4.1.amzn1.x86_64
php71-mysqlnd-7.1.32-1.42.amzn1.x86_64
php71-pspell-7.1.32-1.42.amzn1.x86_64
php71-mbstring-7.1.32-1.42.amzn1.x86_64
php71-embedded-7.1.32-1.42.amzn1.x86_64
php71-7.1.32-1.42.amzn1.x86_64
php71-process-7.1.32-1.42.amzn1.x86_64
php71-pdo-7.1.32-1.42.amzn1.x86_64
php71-pecl-http-3.1.0-6.2.amzn1.x86_64
php71-pecl-apcu-5.1.8-2.5.amzn1.x86_64
php71-pecl-imagick-3.4.4-1.7.amzn1.x86_64
php71-dba-7.1.32-1.42.amzn1.x86_64
php71-pecl-memcached-3.0.0-0.1.20160217git6ace07d.3.amzn1.x86_64
php71-recode-7.1.32-1.42.amzn1.x86_64
php71-pgsql-7.1.32-1.42.amzn1.x86_64
php71-pecl-xdebug-2.5.5-1.10.amzn1.x86_64
php71-pdo-dblib-7.1.32-1.42.amzn1.x86_64
php71-odbc-7.1.32-1.42.amzn1.x86_64
php71-pecl-propro-devel-2.0.1-4.2.amzn1.x86_64
php71-pecl-igbinary-devel-1.2.2-0.1.20151217git2b7c703.6.amzn1.x86_64
php71-xmlrpc-7.1.32-1.42.amzn1.x86_64
php71-intl-7.1.32-1.42.amzn1.x86_64
php71-opcache-7.1.32-1.42.amzn1.x86_64
php71-fpm-7.1.32-1.42.amzn1.x86_64
php71-mcrypt-7.1.32-1.42.amzn1.x86_64
php71-gmp-7.1.32-1.42.amzn1.x86_64
php71-pecl-oauth-2.0.2-1.3.amzn1.x86_64
php71-pecl-memcache-3.0.9-0.4.20160311git4991c2f.9.amzn1.x86_64
php71-soap-7.1.32-1.42.amzn1.x86_64
php71-json-7.1.32-1.42.amzn1.x86_64
php71-common-7.1.32-1.42.amzn1.x86_64
php71-devel-7.1.32-1.42.amzn1.x86_64
php71-pecl-igbinary-1.2.2-0.1.20151217git2b7c703.6.amzn1.x86_64
php7-pear-1.10.7-3.28.amzn1.noarch
php71-pecl-imagick-devel-3.4.4-1.7.amzn1.x86_64
php71-tidy-7.1.32-1.42.amzn1.x86_64
php71-pecl-apcu-devel-5.1.8-2.5.amzn1.x86_64
php71-snmp-7.1.32-1.42.amzn1.x86_64
php71-pecl-redis-3.1.1-1.2.amzn1.x86_64
php71-dbg-7.1.32-1.42.amzn1.x86_64
php71-pecl-ssh2-1.0-5.17.amzn1.x86_64
php71-gd-7.1.32-1.42.amzn1.x86_64
php71-bcmath-7.1.32-1.42.amzn1.x86_64
php71-ldap-7.1.32-1.42.amzn1.x86_64
php71-cli-7.1.32-1.42.amzn1.x86_64
php71-xml-7.1.32-1.42.amzn1.x86_64
php71-pecl-propro-2.0.1-4.2.amzn1.x86_64

Also, may be this might be issue with upgrading owncloud from 10.0.7 to 10.3

Hey,

if the issue has started after upgrading from 10.0.7 to 10.3.0 then i think it could make sense to report an issue to the ownCloud team at https://github.com/owncloud/core/issues.

I have found an older issue about this there in https://github.com/owncloud/core/pull/32961 and the issue there seems to have been caused by older linux distributions and required a workaround. Maybe that is the reason why @eneubauer can’t reproduce this if a different base linux distribution is used?