{"reqId":"evVUI0YR8mu44QiDs2eI","level":3,"time":"2020-03-15T21:30:06+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":{"Exception":"TypeError","Message":"idn_to_ascii() expects parameter 1 to be string, null given","Code":0,"Trace":[{"file":"\/opt\/www\/nextcloud\/lib\/private\/Mail\/Message.php","line":78,"function":"idn_to_ascii","args":[null,0,1]},{"file":"\/opt\/www\/nextcloud\/lib\/private\/Mail\/Message.php","line":143,"function":"convertAddresses","class":"OC\\Mail\\Message","type":"->","args":[{"john.doe":"John Doe"}]},{"file":"\/opt\/www\/nextcloud\/apps\/activity\/lib\/MailQueueHandler.php","line":394,"function":"setTo","class":"OC\\Mail\\Message","type":"->","args":[{"john.doe":"John Doe"}]},{"file":"\/opt\/www\/nextcloud\/apps\/activity\/lib\/MailQueueHandler.php","line":163,"function":"sendEmailToUser","class":"OCA\\Activity\\MailQueueHandler","type":"->","args":["john.doe@domain.corp","john.doe","en","Asia\/Bangkok",1584307801]},{"file":"\/opt\/www\/nextcloud\/apps\/activity\/lib\/BackgroundJob\/EmailNotification.php","line":65,"function":"sendEmails","class":"OCA\\Activity\\MailQueueHandler","type":"->","args":[500,1584307801]},{"file":"\/opt\/www\/nextcloud\/lib\/private\/BackgroundJob\/Job.php","line":61,"function":"run","class":"OCA\\Activity\\BackgroundJob\\EmailNotification","type":"->","args":[null]},{"file":"\/opt\/www\/nextcloud\/lib\/private\/BackgroundJob\/TimedJob.php","line":55,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"\/opt\/www\/nextcloud\/cron.php","line":124,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"\/opt\/www\/nextcloud\/lib\/private\/Mail\/Message.php","Line":78,"CustomMessage":"--"},"userAgent":"--","version":"17.0.2.1"}
How to use GitHub
Steps to reproduce
john.doe(missing @Domain).Expected behaviour
If user in LDAP has malformed "mail" attribute, the user should just be skipped and deleted from
activity_mqtable when sending activity notifications.Or in other words:
Actual behaviour
If user has malformed "mail" attribute in LDAP it causes an activity notification loop. Pending activity notification mails are not removed from
activity_mqtable for any user, causing every user keep getting the same activity notification on every processing.User in LDAP had malformed "mail" attribute: it was missing @ character and domain. Example mail address:
A share was added by another user to a company-wide group in LDAP so everyone in the company got an "activity notification" mail.
The malformed mail address caused even those mails that were already sent out to not be deleted from
activity_mqtable. Notifications were sent out again to all users. This repeats on every activity notification processing untilactivity_mqtable is cleaned up manually.It seems that the
activity_mqtable entries are not deleted at all if even one entry in a batch of activity notifications fail.Server configuration
Operating system: EL7
Web server: Apache
Database: MySQL
PHP version: 7.3
Nextcloud version: 17.0.2
Updated from an older Nextcloud/ownCloud or fresh install: several updates from 15
Where did you install Nextcloud from: official
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: ActiveDirectory
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser: irrelevant
Operating system: irrelevant
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log