• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Changes to php.ini, mail.add_x_header and sendmail_from

iainh

Basic Pleskian
I am migrating from Plesk 8 to 12 on CentOS 6 and still trying to iron out a few issues.

Currently I'm looking at two php-sent mail issues.

Issue 1: X-PHP-Originating-Script header has appeared in mail sent by new vhost

Mail sent from the new box includes the X-PHP-Originating-Script header which is a bit of a security hole, hence I'd like to remove/suproess this. The php documentation (http://php.net/manual/en/mail.configuration.php) says:
mail.add_x_header bool
Add X-PHP-Originating-Script that will include UID of the script followed by the filename.
The php.ini for the particular site (/var/www/vhosts/system/domain.tld/etc/php.ini) includes mail.add_x_header = On and so I would seem to need to alter this to read = 0 or = Off, however the php.ini file starts...

; ATTENTION!
;
; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
; SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.

So how then would I make this change and not have it lost, or would it only be loast at a php update and so 'reasonably safe' to change?​

Issue 2: SMTP Return-Path header overridden

The sending php script sets a suitable Return-Path header value, but on the new vhost this is being overridden and replaced with <apache@hostname.tld>. I suspect too that this name is also being used as the SMTP HELO name during mail sending. This will then mean a DMARC check will note the MailFrom and Sender domains are different and so I'd really like to stop this behaviour.

Again the php documentation points to:
sendmail_from string
Which "From:" mail address should be used in mail sent from PHP under Windows. This directive also sets the "Return-Path:" head
I am *presuming* this value will also be used as the SMTP HELO name, but if someone knows this one way or another of how to correctly set the HELO name, I'd be very grateful.

Now the php.ini doesn't include the sendmail_from setting at all which is probably why it's defaulting to the <apache@domain.tld> name, but again, how can I add this and not have the configration lost as per the warning in php.ini?​

And finally...

I mentioned there is a php.ini for each vhost saved in /var/www/vhosts/system/domain.tld/etc/php.ini. Am I correct in beleiving that once I've confirmed how to make these proposed php.ini changes 'safely', I can set these appropriate to each vhost so that mail sent from each site can be correctly sent under the appropriate domain name and not under the physical host name?​

Many thanks.../Iain
 
Back
Top