I have just installed PHPMailer 6.1 and managed to send a test e-mail through a simple php file using command line (php my_email_file.php). I was even able to sign it with DKIM so that Gmail flag it as signed by my domain. However, when I run the very same file through the browser (www.mydomain.com/my_email_file.php), the e-mail is sent but the DKIM signature no longer works. Debug info does not contain any hints, it simply ignores de DKIM part. If I copy and paste the private key file within my website folder (/var/www/...) everything works again but this is obviously not a good solution. So I guess the problem is that the website user is unable to access /var/amavis folder and files, hence not able to use the private key to sign. Any recommended solution? Thank you very much in advance.