Skip to content
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

Error while sending mail (with the + char in the localpart) #21039

Closed
moviuro opened this issue May 18, 2020 · 2 comments
Closed

Error while sending mail (with the + char in the localpart) #21039

moviuro opened this issue May 18, 2020 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info

Comments

@moviuro
Copy link

moviuro commented May 18, 2020

Steps to reproduce

  1. Login as administrator of the instance
  2. Set up that user's email address with a + in the Avatar > Settings page (settings/user) (realaddress+tag@gmail.com for example)
  3. In Administration > Basic Settings (settings/admin), try sending an email

Expected behaviour

Email is sent.

Actual behaviour

A problem occurred while sending the email. Please revise your settings. (Error: Address in mailbox given [moviuro+nexcloudadmin@] does not comply with RFC 2822, 3.6.2.)

This is a new error that didn't happen in previous versions (didn't have the issue on February 14th, for instance).

BTW: the localpart of a recipient can mostly NEVER be properly validated server-side. A + sign is just as valid as a - or _.

BTW: it is impossible for me to change the email address from within Nextcloud: I'll open another bug for that.

EDIT: Looks like #8387 ?

Server configuration

Operating system: FreeBSD 12.1

Web server: nginx

Database: Postgre

PHP version: 7.3.17

Nextcloud version: 18.0.4

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

Where did you install Nextcloud from: pkg(8)

Signing status: N/A

List of activated apps:

App list Enabled: - accessibility: 1.4.0 - activity: 2.11.0 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - dav: 1.14.0 - federatedfilesharing: 1.8.0 - federation: 1.8.0 - files: 1.13.1 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - music: 0.14.0 - nextcloud_announcements: 1.7.0 - notifications: 2.6.0 - oauth2: 1.6.0 - password_policy: 1.8.0 - photos: 1.0.0 - previewgenerator: 2.3.0 - privacy: 1.2.0 - provisioning_api: 1.8.0 - recommendations: 0.6.0 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - support: 1.1.0 - survey_client: 1.6.0 - systemtags: 1.8.0 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - twofactor_totp: 4.1.3 - updatenotification: 1.8.0 - viewer: 1.2.0 - workflowengine: 2.0.0 Disabled: - admin_audit - encryption - files_external - user_ldap

Nextcloud configuration:

Config report { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "sco.popho.be" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/next.cloud.mydomain.com", "dbtype": "pgsql", "version": "18.0.4.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_smtpsecure": "ssl", "mail_from_address": "moviuro", "mail_domain": "***REMOVED SENSITIVE VALUE***", (that one little offering from Google) "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "theme": "", "loglevel": 2, "maintenance": false, "apps_paths": [ { "path": "\/usr\/local\/www\/nextcloud\/apps", "url": "\/apps", "writable": true }, { "path": "\/usr\/local\/www\/nextcloud\/apps-pkg", "url": "\/apps-pkg", "writable": false } ], "memcache.local": "\\OC\\Memcache\\APCu", "mail_sendmailmode": "smtp" } }

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

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Web server error log

Web server error log

Nextcloud log (data/nextcloud.log)

Nextcloud log {"reqId":"OkWOZYHx8uoZ0shRXEa5","level":3,"time":"2020-05-18T16:45:56+00:00","remoteAddr":"10.21.10.12","user":"nextcloud-administrator","app":"settings","method":"POST","url":"/ocs/v2.php/cloud/users/doofar/welcome","message":{"Exception":"Swift_RfcComplianceException","Message":"Address in mailbox given [doofar.mydomainwithnodots@] does not comply with RFC 2822, 3.6.2.","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php","line":272,"function":"assertValidAddress","class":"Swift_Mime_Headers_MailboxHeader","type":"->","args":["doofar.mydomainwithnodots@"]},{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php","line":117,"function":"normalizeMailboxes","class":"Swift_Mime_Headers_MailboxHeader","type":"->","args":[{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php","line":74,"function":"setNameAddresses","class":"Swift_Mime_Headers_MailboxHeader","type":"->","args":[{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php","line":61,"function":"setFieldBodyModel","class":"Swift_Mime_Headers_MailboxHeader","type":"->","args":[{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php","line":71,"function":"createMailboxHeader","class":"Swift_Mime_SimpleHeaderFactory","type":"->","args":["To",{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php","line":323,"function":"addMailboxHeader","class":"Swift_Mime_SimpleHeaderSet","type":"->","args":["To",{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/lib/private/Mail/Message.php","line":149,"function":"setTo","class":"Swift_Mime_SimpleMessage","type":"->","args":[{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Mailer/NewUserMailHelper.php","line":172,"function":"setTo","class":"OC\\Mail\\Message","type":"->","args":[{"doofar.mydomainwithnodots@":"Doofar"}]},{"file":"/usr/local/www/nextcloud/apps-pkg/provisioning_api/lib/Controller/UsersController.php","line":975,"function":"sendMail","class":"OCA\\Settings\\Mailer\\NewUserMailHelper","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Mail\\EMailTemplate"}]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"resendWelcomeMessage","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["doofar"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"resendWelcomeMessage"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"resendWelcomeMessage"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Provisioning_API\\Controller\\UsersController","resendWelcomeMessage",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"userId":"doofar","_route":"ocs.provisioning_api.Users.resendWelcomeMessage"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"userId":"doofar","_route":"ocs.provisioning_api.Users.resendWelcomeMessage"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"userId":"doofar","_route":"ocs.provisioning_api.Users.resendWelcomeMessage"}]},{"file":"/usr/local/www/nextcloud/ocs/v1.php","line":82,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/cloud/users/doofar/welcome"]},{"file":"/usr/local/www/nextcloud/ocs/v2.php","line":24,"args":["/usr/local/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php","Line":355,"CustomMessage":"Can't send new user mail to doofar.mydomainwithnodots@amaildomain.com"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.4.2"}
@moviuro moviuro added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 18, 2020
@szaimen
Copy link
Contributor

szaimen commented Jun 2, 2021

Is this Issue still valid? If not, please close this issue. Thanks! :)

@moviuro
Copy link
Author

moviuro commented Jun 2, 2021

Indeed, can't reproduce!

@moviuro moviuro closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info
Projects
None yet
Development

No branches or pull requests

2 participants