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

Address in mailbox given [https:\/\/spreed.me\/picloud] does not comply with RFC 2822, 3.6.2 #951

Closed
LukasReschke opened this issue Aug 18, 2016 · 17 comments
Assignees

Comments

@LukasReschke
Copy link
Member

Another fatal error in the server logs:

Exception: {"Message":"Address in mailbox given [https:\/\/spreed.me\/picloud] does not comply with RFC 2822, 3.6.2.","Exception":"Swift_RfcComplianceException","Code":0,"Trace":"#0 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/Headers\/MailboxHeader.php(263): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('https:\/\/spreed....')\n#1 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/Headers\/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array)\n#2 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/Headers\/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array)\n#3 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array)\n#4 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/SimpleHeaderSet.php(68): Swift_Mime_SimpleHeaderFactory->createMailboxHeader('To', Array)\n#5 \/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/SimpleMessage.php(323): Swift_Mime_SimpleHeaderSet->addMailboxHeader('To', Array)\n#6 \/var\/www\/html\/lib\/private\/Mail\/Message.php(128): Swift_Mime_SimpleMessage->setTo(Array)\n#7 \/var\/www\/html\/apps\/dav\/lib\/CalDAV\/Schedule\/IMipPlugin.php(113): OC\\Mail\\Message->setTo(Array)\n#8 [internal function]: OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin->schedule(Object(Sabre\\VObject\\ITip\\Message))\n#9 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#10 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(306): Sabre\\Event\\EventEmitter->emit('schedule', Array)\n#11 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(528): Sabre\\CalDAV\\Schedule\\Plugin->deliver(Object(Sabre\\VObject\\ITip\\Message))\n#12 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(294): Sabre\\CalDAV\\Schedule\\Plugin->processICalendarChange(NULL, Object(Sabre\\VObject\\Component\\VCalendar), Array, Array, true)\n#13 [internal function]: Sabre\\CalDAV\\Schedule\\Plugin->calendarObjectChange(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), Object(Sabre\\VObject\\Component\\VCalendar), 'calendars\/olivi...', true, true)\n#14 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#15 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php(889): Sabre\\Event\\EventEmitter->emit('calendarObjectC...', Array)\n#16 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php(771): Sabre\\CalDAV\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars\/olivi...', false, Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), true)\n#17 [internal function]: Sabre\\CalDAV\\Plugin->beforeCreateFile('calendars\/olivi...', 'BEGIN:VCALENDAR...', Object(OCA\\DAV\\CalDAV\\Calendar), false)\n#18 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#19 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1034): Sabre\\Event\\EventEmitter->emit('beforeCreateFil...', Array)\n#20 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(523): Sabre\\DAV\\Server->createFile('calendars\/olivi...', 'BEGIN:VCALENDAR...', NULL)\n#21 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#22 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#23 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#24 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#25 \/var\/www\/html\/apps\/dav\/lib\/Server.php(184): Sabre\\DAV\\Server->exec()\n#26 \/var\/www\/html\/apps\/dav\/appinfo\/v2\/remote.php(30): OCA\\DAV\\Server->exec()\n#27 \/var\/www\/html\/remote.php(165): require_once('\/var\/www\/html\/a...')\n#28 {main}","File":"\/var\/www\/html\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mime\/Headers\/MailboxHeader.php","Line":348,"User":"olivier"}   

@oparoz Do you have any information on that event? That would be good to know to have this reproducible :)

@LukasReschke LukasReschke added this to the Nextcloud 10.0 milestone Aug 18, 2016
@oparoz
Copy link
Member

oparoz commented Aug 18, 2016

It's quite easy to reproduce.

  1. Create an event in the calendar
  2. Add the URL as an attendee
  3. Set that attendee to being a room and make it a non-attendant

This will probably also happen is you add a resource.

@MorrisJobke
Copy link
Member

Moved to 10.0.2

@MorrisJobke
Copy link
Member

Still an issue:

{"reqId":"CBPGSIYj0nz4YquM4nwH","level":4,"time":"2017-08-07T10:04:51+00:00","remoteAddr":"192.168.99.1","user":"admin","app":"webdav","method":"PUT","url":"\/server\/remote.php\/dav\/calendars\/admin\/personal\/Nextcloud-QSK29ZWS0JAMSCYJ9853.ics","message":"Exception: {\"Exception\":\"Swift_RfcComplianceException\",\"Message\":\"Address in mailbox given [https://spreed.me/picloud@] does not comply with RFC 2822, 3.6.2.\",\"Code\":0,\"Trace\":\"
#0 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(263): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('https://spreed....')
#1 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array)
#2 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array)
#3 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array)
#4 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php(68): Swift_Mime_SimpleHeaderFactory->createMailboxHeader('To', Array)
#5 3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(329): Swift_Mime_SimpleHeaderSet->addMailboxHeader('To', Array)
#6 lib/private/Mail/Message.php(128): Swift_Mime_SimpleMessage->setTo(Array)
#7 apps/dav/lib/CalDAV/Schedule/IMipPlugin.php(112): OC\\Mail\\Message->setTo(Array)
#8 [internal function]: OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin->schedule(Object(Sabre\\VObject\\ITip\\Message))
#9 3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#10 3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php(384): Sabre\\Event\\EventEmitter->emit('schedule', Array)
#11 3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php(665): Sabre\\CalDAV\\Schedule\\Plugin->deliver(Object(Sabre\\VObject\\ITip\\Message))
#12 3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php(367): Sabre\\CalDAV\\Schedule\\Plugin->processICalendarChange(Object(Sabre\\VObject\\Component\\VCalendar), Object(Sabre\\VObject\\Component\\VCalendar), Array, Array, true)
#13 [internal function]: Sabre\\CalDAV\\Schedule\\Plugin->calendarObjectChange(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), Object(Sabre\\VObject\\Component\\VCalendar), 'calendars/admin...', true, false)
#14 3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#15 3rdparty/sabre/dav/lib/CalDAV/Plugin.php(943): Sabre\\Event\\EventEmitter->emit('calendarObjectC...', Array)
#16 3rdparty/sabre/dav/lib/CalDAV/Plugin.php(772): Sabre\\CalDAV\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars/admin...', false, Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), false)
#17 [internal function]: Sabre\\CalDAV\\Plugin->beforeWriteContent('calendars/admin...', Object(OCA\\DAV\\CalDAV\\CalendarObject), 'BEGIN:VCALENDAR...', false)
#18 3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#19 3rdparty/sabre/dav/lib/DAV/Server.php(1128): Sabre\\Event\\EventEmitter->emit('beforeWriteCont...', Array)
#20 3rdparty/sabre/dav/lib/DAV/CorePlugin.php(513): Sabre\\DAV\\Server->updateFile('calendars/admin...', 'BEGIN:VCALENDAR...', NULL)
#21 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))
#22 3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#23 3rdparty/sabre/dav/lib/DAV/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)
#24 3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))
#25 apps/dav/lib/Server.php(253): Sabre\\DAV\\Server->exec()
#26 apps/dav/appinfo/v2/remote.php(33): OCA\\DAV\\Server->exec()
#27 remote.php(162): require_once('/srv/projects/s...')
#28 {main}\",\"File\":\"3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php\",\"Line\":347}","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit\/603.3.8 (KHTML, like Gecko) Version\/10.1.2 Safari\/603.3.8","version":"13.0.0.2"}

@MorrisJobke MorrisJobke removed this from the Nextcloud 10.0.6 milestone Aug 7, 2017
@MorrisJobke
Copy link
Member

I would say this is more a problem of the calendar, right? It should valide at least the input in JS and also show a proper error, because now it only closes the sidebar without any indication.

cc @georgehrke

@georgehrke
Copy link
Member

georgehrke commented Aug 7, 2017

I will check the RFC 5545 for that, but the iMipPlugin should simply ignore anything that's not mailto:// imho

@georgehrke
Copy link
Member

This error is actually supposed to be caught:

if (parse_url($iTipMessage->recipient, PHP_URL_SCHEME) !== 'mailto') {

Needs some debugging

@georgehrke georgehrke self-assigned this Aug 7, 2017
@enoch85
Copy link
Member

enoch85 commented Sep 13, 2017

Not much help maybe, but I got this recently in 12.0.2:

Swift_RfcComplianceException: Address in mailbox given [Nextcloud@] does not comply with RFC 2822, 3.6.2.

Edit, like 100 times over a period of a few days. And no, it's not generated by cron.

@mc9625
Copy link

mc9625 commented Nov 17, 2017

I can't say if it's relevant or not, but I've experienced a similar issue (@localhost.localdomain were attached at the end of the real email address, so it became something like firstname.lastname@gmail.com@localhost.localdomain). The issue disappeared as soon as I've unchecked the "allow users to share via link" option. Strange.

@vasyugan
Copy link

vasyugan commented Feb 4, 2018

I see this error whenever I try to share a file via the desktop client
grafik

@DanLeonelli
Copy link

DanLeonelli commented Feb 16, 2018

This is happening on the new version ever since updated to 13 whenever trying to share a file to anyone.

@stone212
Copy link

stone212 commented May 8, 2018

@DanLeonelli This was happening for me also and this fixed the problem: https://www.techandme.se/important-notice-add-your-own-smtp-settings-in-nextcloud/

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@oparoz
Copy link
Member

oparoz commented Sep 12, 2018

Still a problem with 14. The send test button generates the problem when setting up SMTP

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Sep 12, 2018
@georgehrke
Copy link
Member

Then we are talking about different issues here ...

The original error reported by Lukas is triggered from inside OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin. That class is responsible and only responsible for sending out Calendar Invitations.

Hitting the Test Button should not be related to that.

@georgehrke
Copy link
Member

@oparoz Any chance you can provide the stack trace for your error? thx

@oparoz
Copy link
Member

oparoz commented Sep 13, 2018

I'll open a separate report. It seems the class responsible to send emails never gets the domain name:

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

@georgehrke
Copy link
Member

I will close this issue, because the original issue is not reproducible and should be caught by https://github.com/nextcloud/server/blob/v13.0.7/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php#L133L139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests