-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email validation fails in multiple locations #2162
Comments
This issue was resolved by installing the icu program (http://www.freshports.org/devel/icu/) and related libraries into the PHP chroot environment. While icu was installed properly in the web environment, this is not sufficient when using php-fpm's chroot feature. The icu and related Unicode libraries need to be accessible in the chroot directory structure. It would be nice if Nextcloud could run a check for this and report an error other than silently failing. |
Feel free to reopen with more information, especially the address you are trying to use. |
This was really useful in pointing me towards a solution to the problem I was having! For a few weeks, I have been running Nextcloud inside of a very restrictive chroot. Yesterday I had a user tell me that they got an error when trying to reset their password via e-mail. After testing e-mail sending from the admin interface, I got the "Address in mailbox given ... does not comply with RFC 2822, 3.6.2." error. I eventually figured out that this was caused by a big .dat file from the icu package not being accessible from inside of the chroot, and this caused Swiftmailer to fail and give me the error. To get Nextcloud to successfully send e-mail via SMTP from within the chroot, it was simply a matter of copying this file into the chroot: That is on FreeBSD, and on Linux the path to the file should be something like this (CentOS 7.5): I hope that this will be useful to anybody else trying to run Nextcloud within a chroot in the future. |
Steps to reproduce
Expected behaviour
1: A valid email address should be accepted.
2: Email should be sent using the valid email address set.
Actual behaviour
Valid email address are rejected.
Server configuration
Operating system: FreeBSD
Web server: Nginx 1.10
Database: MariaDB 10
PHP version: 5.6.27 & 7.0.12
Nextcloud version: (see Nextcloud admin page) 10.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Updated. Originally ownCloud. Also tested with a clean install of 10.0.1 directly.
Where did you install Nextcloud from: Direct download
Signing status:
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: No
Are you using encryption: No
Are you using an external user-backend: No
Client configuration
Browser: Firefox, Chrome, Epiphany, Chromium
Operating system: Fedora GNU/Linux
Logs
Web server error log
Nextcloud log (data/nextcloud.log)
More information
Here is a breakdown of my testing and the exact errors I am seeing.
Email address are not being validating properly. There are two areas where I can reproduce this.
1: Attempting to set the email on a users personal page.
This simply tells you that any input is invalid regardless of what is entered.
2: Setting up email for sending notifications. Click the send email button after configuring SMTP settings. The following error is displayed.
This seems related, swiftmailer/swiftmailer#382
I can disable the check by commenting out the code on lines 348-351 of /3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php
With that code commented out, Nextcloud sends the email, which is then properly rejected by the SMTP server. Here the errors from that.
Nextcloud Error:
SMTP server error:
It seems the domain is not being appended to the email address. Previous versions of Nextcloud, and ownCloud before it worked properly. I have manually tested swiftmailer, and as far as I can tell it works perfectly.
Any ideas or tests I can run to provide more information?
The text was updated successfully, but these errors were encountered: