Hello,
So far the only way I can make OJS to send email messages is using php’s internal mail() function, but it causes the messages to be caught by spam filters. I need to enable the smtp function so we can use a proper email address, with DKIM and SPF, but so far I’ve been unable to make it work, and I lack the experience to understand the logs to attempt to figure out what is the problem. I really need a hand with this.
We are using OJS 2.4.8.2
I tried using the server internal smtp, with an email account created for that purpose, but got the following log entries:
Blockquote
2017-09-21 17:19:37 Error 152.174.48.85 AH01071: Got error ‘PHP message: ojs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/file/FileManager.inc.php\n At line: 306\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 57\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: fopen(): Filename cannot be empty\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 110\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: flock() expects parameter 1 to be resource, boolean given\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 111\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2: Couldn’t lock the file.\n’, referer: http://testmail.summapsicologica.cl/index.php/summa Apache error
2017-09-21 17:19:38 Access 152.174.48.85 200 GET /index.php/summa/login/lostPassword HTTP/1.0 http://testmail.summapsicologica.cl/index.php/summa/login/signIn Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 16.7 K Apache access
2017-09-21 17:19:39 Error 152.174.48.85 AH01071: Got error ‘PHP message: ojs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/file/FileManager.inc.php\n At line: 306\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 57\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: fopen(): Filename cannot be empty\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 110\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: flock() expects parameter 1 to be resource, boolean given\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 111\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2: Couldn’t lock the file.\n’, referer: http://testmail.summapsicologica.cl/index.php/summa/login/signIn Apache error
2017-09-21 17:19:45 Access 152.174.48.85 200 POST /index.php/summa/login/requestResetPassword HTTP/1.0 http://testmail.summapsicologica.cl/index.php/summa/login/lostPassword Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 15.7 K Apache access
2017-09-21 17:19:46 Error 152.174.48.85 AH01071: Got error ‘PHP message: OJS SMTPMailer: Could not authenticate\n’, referer: http://testmail.summapsicologica.cl/index.php/summa/login/lostPassword Apache error
2017-09-21 17:19:46 Error 152.174.48.85 AH01071: Got error ‘PHP message: ojs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/file/FileManager.inc.php\n At line: 306\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 57\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: fopen(): Filename cannot be empty\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 110\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: flock() expects parameter 1 to be resource, boolean given\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 111\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2: Couldn’t lock the file.\n’, referer: http://testmail.summapsicologica.cl/index.php/summa/login/lostPassword Apache error
Then I tried using a googlemail email account, I noticed the errors are different:
Blockquote
2017-09-21 20:57:39 Access 152.174.48.85 302 GET / HTTP/1.0 Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 334 Apache access
2017-09-21 20:57:39 Access 152.174.48.85 200 GET /index.php/summa HTTP/1.0 Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 5.71 K Apache access
2017-09-21 20:57:39 Error 152.174.48.85 AH01071: Got error ‘PHP message: ojs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/file/FileManager.inc.php\n At line: 306\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 57\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: fopen(): Filename cannot be empty\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 110\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: flock() expects parameter 1 to be resource, boolean given\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php\n At line: 111\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2: Couldn’t lock the file.\n’ Apache error
2017-09-21 20:57:40 Error 152.174.48.85 AH01071: Got error ‘PHP message: ojs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/lib/pkp/classes/file/FileManager.inc.php\n At line: 306\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\nPHP message: ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /var/www/vhosts/testmail.summapsicologica.cl/httpdocs/plugins/generic/usageStats/UsageStatsPlugin.inc.php\n At line: 430\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.6.31\n Apache Version: N/A\n DB Driver: mysql\n DB server version: 5.7.19-0ubuntu0.16.04.1\n’ Apache error
2017-09-21 20:57:43 Access 152.174.48.85 200 POST /index.php/summa/login/signIn HTTP/1.0 http://testmail.summapsicologica.cl/index.php/summa Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 4.57 K Apache access
2017-09-21 20:57:44 Access 152.174.48.85 200 GET /lib/pkp/summa/img/login_send.png HTTP/1.0 http://testmail.summapsicologica.cl/lib/pkp/summa/css/custom.css Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 266 Apache access
2017-09-21 20:57:44 Access 152.174.48.85 200 GET /lib/pkp/summa/img/login_send.png HTTP/1.1 http://testmail.summapsicologica.cl/lib/pkp/summa/css/custom.css Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 2.96 K nginx access
2017-09-21 20:57:47 Access 152.174.48.85 200 GET /index.php/summa/login/lostPassword HTTP/1.0 http://testmail.summapsicologica.cl/index.php/summa/login/signIn Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 4.72 K Apache access
2017-09-21 21:14:20 Access 152.174.48.85 200 POST /index.php/summa/login/requestResetPassword HTTP/1.0 http://testmail.summapsicologica.cl/index.php/summa/login/lostPassword Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 4.38 K Apache access
2017-09-21 21:14:30 Error 152.174.48.85 AH01071: Got error ‘PHP message: OJS SMTPMailer: Did not receive expected 220\n’, referer: http://testmail.summapsicologica.cl/index.php/summa/login/lostPassword
I think there are other errors that are not exactly related to the smtp problem, but I’m not sure about what is the problem, since the site seems to be working properly, except for the smtp part.
I’d appreciate any help or hint about how to solve this problem,
Thanks