0

I have several subdomains (virtual hosts) with Laravel (php framework). All of the projects have the same setup for sending mails via Mailgun. (Mailgun is a web service to which you send http requests with the contents of your emails, recipients, subjects, etc and it sends it for you.)

Every subdomain has its own folder in /var/www/vhosts/system/[subdomain]/conf/ (Plesk places them there, by default, I think) and there's always a file httpd.conf which allows you to add more settings per subdomain. In all of them I have specified the following:

php_admin_value curl.cainfo "/usr/share/ca-certificates/curl/cacert.pem"

Requests to Mailgun are made using guzzlehttp's components (a composer packages that wrap around the curl php extension for easy use).

Until Monday, every of the subdomains had no problems in sending emails. However on Monday, one of the subdomains stopped sending emails and started getting the error:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

The other ones are working just fine with the same .pem file.

I haven't changed anything in the configuration of those virtual hosts, nor the server.

What might have caused the problem and how can I fix it?

Server:

Linux [...] 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u3 x86_64 GNU/Linux

Plesk:

Product version: 12.5.30 Update #74
Update date: 2018/01/23 06:26
Build date: 2016/06/08 10:00
OS version: Debian 7.9
Revision: 344620
Architecture: 64-bit
Wrapper version: 1.2

PHP:

PHP 5.6.30-1~dotdeb+7.1 (cli) (built: Jan 21 2017 14:50:59) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Apache:

Server version: Apache/2.2.22 (Debian)
Server built:   Jul 20 2016 05:07:38

curl:

curl 7.26.0 (x86_64-pc-linux-gnu) libcurl/7.26.0 OpenSSL/1.0.1t zlib/1.2.7 libidn/1.25 libssh2/1.4.2 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp 
Features: Debug GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 
1

There seems to be an issue with Mailgun's latest certificate. The Guzzle cacaert.pem needs to be manually updated, see here for good info: https://www.drupal.org/project/mailgun/issues/2939004

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.