• 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.

Resolved Return path in mail header when sending mail with PHP script

Thomas Becker

Basic Pleskian
Hello,
When a PHP script is sending a mail, there is added an return path in mail header. How to change that mail address in return path?

We are using Postfix and CentOS 6.5

Plesk is setting the mail address of the owner of the hosting account. When changing the owners mail address in Plesk, the return path is still the same and is not updated

Regards
Thomas
 
Hmmm..

Check the domain's php.ini (/var/www/vhosts/domain.tld/etc I think)

Code:
; For Win32 only.
; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
sendmail_from = [email protected]
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]

In the domain's php.ini, you'll see a section under [mail_function] with one or both of these which you can then edit (but ideally via the GUI as otherwise the setting may be overwritten).

Obviously the windows section is for windows, but I change both to be on the safe side :)
 
Hi Faris Raouf,
thanks for your response but there is no mail address specified in users php.ini nor in global php.ini:
sendmail_path = /usr/sbin/sendmail -t -i

'sendmail_from' is not set in both php.ini files.

Where does Plesk set the mail address used in return path in mail header?
 
Hi there
I am also looking to fix this Return-Path issue fixed on my server. When I send mass-mails from PHP, any bounces just get logged in maillog, but do not go to my email address (which is set in the domain owner). I specity a Return-Path in my mail headers, but this is ignored.
 
Hi PACh,

did you at least TRY to setup your depending PHP.INI as suggested by @Faris Raouf with his post => #2 ?
( pls. note, that domain - specific PHP.INI - files are located at "/var/www/vhosts/system/DOMAIN.COM-OR-SUBDOMAIN.DOMAIN.COM/etc"; additional modifications can as well being added over the Plesk Control Panel at "Home > Subscriptions > DOMAIN.COM > Websites & Domains > PHP Settings > (textbox) Additional directives" - Consider as well to modify the "mail.force_extra_parameters" - configuration ( available sind PHP 5 => http://php.net/manual/en/mail.configuration.php#ini.mail.force_extra_parameters ), as for example with "-f[email protected]" - where the "-f" is essential in front of your desired eMail - sender - adress!!! )
 
Back
Top