RoRoo
Verified User
- Joined
- Dec 16, 2004
- Messages
- 112
Goodday! I've got an irritating issue at hand.
I've got a user: user that has several domains configured under it's account.
in the account he has several cronjobs that does some action and sends messages to users gmail address.
Since a few weeks now the user hasn't been receiving these mail messages anymore and the logs indicate Google blocks them due to DMARC policy.
I've fixed the system (server.domain.com) DKIM key so system messages get signed correctly. And the users domains have their own DKIM settings configured as well.
Now the cron runs the script (/usr/local/bin/php -f /home/user/domains/domainB.com/public_html/testscript.php) that is being run as the user "user".
in that php script there's a setting to send an email from: [email protected]
But somehow the message is getting signed with the key for "server.domain.com" and not the key for domainB.com
I get that cron has a system mail addres, but why is the phpscript (being run as the user that does not control server.domain.com) signing it like that?
The message is being sent using: mail($to, $subject, $body, $headers);
$headers contains the From: [email protected]
I know something obvious is wrong, but I can't seem to find it
I've got a user: user that has several domains configured under it's account.
in the account he has several cronjobs that does some action and sends messages to users gmail address.
Since a few weeks now the user hasn't been receiving these mail messages anymore and the logs indicate Google blocks them due to DMARC policy.
I've fixed the system (server.domain.com) DKIM key so system messages get signed correctly. And the users domains have their own DKIM settings configured as well.
Now the cron runs the script (/usr/local/bin/php -f /home/user/domains/domainB.com/public_html/testscript.php) that is being run as the user "user".
in that php script there's a setting to send an email from: [email protected]
But somehow the message is getting signed with the key for "server.domain.com" and not the key for domainB.com
I get that cron has a system mail addres, but why is the phpscript (being run as the user that does not control server.domain.com) signing it like that?
The message is being sent using: mail($to, $subject, $body, $headers);
$headers contains the From: [email protected]
I know something obvious is wrong, but I can't seem to find it
