Custom php.ini setting for sendmail_path

Discussion in 'Installation/Configuration' started by zion, Nov 11, 2014.

  1. zion

    zion Member

    ISPConfig 3.0.5.4p3; Debian wheezy; Apache/2.2.22 (Debian)

    I would like to change the vaule of sendmail_path from "/usr/sbin/sendmail -t -i [email protected]" (which is in /var/ww/php-fcgi-scripts/webxxx/.php-fcgi-starter) to a specific e-mail address for a Subdomain (Vhost) Site this time, but I would like to change it for all Sites in the future.

    I tried to add sendmail_path="/usr/sbin/sendmail -t -i [email protected]" to the custom php.ini settings field in ISPConfig. It puts a new line to the end of conf/webxxx_stage/php.ini file, but phpinfo() still shows webmaster and the e-mail Return-Path value still <[email protected]> too.

    The only way I can change this value by modifying it in the /var/ww/php-fcgi-scripts/webxxx/.php-fcgi-starter file and reload apache2 which is not a good solution.

    Can you help me what I am missing?

    My other solution would be to copy /usr/local/ispconfig/server/conf/php-fcgi-starter.master to /usr/local/ispconfig/server/conf-custom/php-fcgi-starter.master and use this line instead of the -f version:
    -d sendmail_path="/usr/sbin/sendmail -t -i" \

    So my next question is why is it important to use the -f parameter with webmaster e-mail address?

    We work with many Drupal sites where the core mail function in system.mail.inc uses this code:
    PHP:
    if (isset($message['headers']['Return-Path']) && !ini_get('safe_mode')) {
      
    $return_path_set strpos(ini_get('sendmail_path'), ' -f');
      if (!
    $return_path_set) {
        
    $message['Return-Path'] = $message['headers']['Return-Path'];
        unset(
    $message['headers']['Return-Path']);
      }
    }
    So if we use -f parameter in server config, then Drupal will use this and overlook the Return-Path parameter of the code of the website.

    Thank you in advance for your help!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If ISPConfig wont set the parameter, then the sender address f emails that were sent with the php mail() function would be like this:

    [email protected]

    so by setting the -f parameter, the address will be:

    [email protected]

    so the cutomer will receive returned emails instead of the web hosting admin.
     
  3. zion

    zion Member

    Thank you, now I understand why is it important to use the -f parameter.

    Can you help me in why not works the custom php.ini modification what I've written above (if I want an other e-mail address instead of webmaster)?
     
    Last edited: Nov 11, 2014
  4. calbasi

    calbasi Member

    I have the same problem. I'd like to set my custom return path email address but if I use custom php.ini settings, at Sites tab, for example:
    sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]
    upload_max_filesize = 3M
    My phpinfo() only shows a modification of the second parameter.
    Then, I think it should be a way to set a custom reply path for a site, without set an address for all the sites in the server...
     

Share This Page