Invalid Return-Path from Email Sent by form's website

Discussion in 'Installation/Configuration' started by Mikeas, Oct 29, 2014.

  1. Mikeas

    Mikeas New Member


    I've got server with IspConfig with multiple domain name.
    Problem is all email sent from website form's has Invalid Return-Path. It is look like : [email protected].
    This is considere as spam. Because SPF does not designate permitted sender hosts.

    I was thinking problem come from ServerAdmin directive from vhost file in sites-enabled directories. But I recently update the template. Now ServerAdmin directive is set with the correct email address.
    I restart Apache and serveur but invalid Return-Path is still appear on the email header.

    Do you know how can I set Return-Path from email sent by form's website with correct email address ?

    This is email header received in the spam folder from Gmail (Also : Yahoo, Hotmail ...). :
    Delivered-To: [email protected]
    Received: by with SMTP id s7csp698826icv;
            Wed, 29 Oct 2014 08:14:40 -0700 (PDT)
    X-Received: by with SMTP id ep9mr13519175wib.82.1414595679468;
            Wed, 29 Oct 2014 08:14:39 -0700 (PDT)
    Return-Path: <[email protected]>
    Received: from myservername.tld (myservername.tld. [])
            by with ESMTPS id r8si6916627wix.42.2014.
            for <[email protected]>
            (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
            Wed, 29 Oct 2014 08:14:39 -0700 (PDT)
    Received-SPF: none ( [email protected] does not designate permitted sender hosts) client-ip=;
           spf=neutral ( [email protected] does not designate permitted sender hosts) [email protected];
           dmarc=fail (p=NONE dis=NONE)
    Received: from localhost (unknown [])
    	by myservername.tld (Postfix) with ESMTP id EFCA5137625F
    	for <[email protected]>; Wed, 29 Oct 2014 16:20:21 +0100 (CET)
    X-Virus-Scanned: Debian amavisd-new at myservername.tld
    Received: from myservername.tld ([])
    	by localhost (myservername.tld []) (amavisd-new, port 10024)
    	with ESMTP id bzhVJlvRS7H5 for <[email protected]>;
    	Wed, 29 Oct 2014 16:20:14 +0100 (CET)
    Received: by myservername.tld (Postfix, from userid 5029)
    	id 175A31376260; Wed, 29 Oct 2014 16:20:14 +0100 (CET)
    To: [email protected]
    Subject: =?UTF-8?Q?Message_formulaire_du_site_cr=C3=?=
    X-PHP-Originating-Script: 5029:class-phpmailer.php
    Date: Wed, 29 Oct 2014 15:20:14 +0000
    From: WordPress <[email protected]>
    Message-ID: <[email protected]>
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.7 (
    MIME-Version: 1.0
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Thank you.
    Last edited: Oct 29, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Depending on choosen php mode, you have to change the php_fpm_pool.conf.master and php-fcgi-starter.master templates as well.

    Just as a side note: your domains should really have a webmaster address.
  3. Mikeas

    Mikeas New Member

    Thank You Till :)

    I modifiy this 2 files with a valid email :

    I restart, apache, and php5-fpm. I also restart the server.

    Email sent still have an invalid Return-Path : [email protected].
    If I check this file : php-fcgi-starter.master php_fpm_pool.conf.master
    now it is looking like this :
    <tmpl_if name='security_level' op='==' value='20'>
    <tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
    php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp
    php_admin_value[upload_tmp_dir] = <tmpl_var name='document_root'>/tmp
    #php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
    php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i [email protected]"

    All domain on the server is not mine. Sometime, the domain's owner use his own email service from other machine. That why I can not create a webmaster address with this domain on my machine.

    Thank you.
  4. Mikeas

    Mikeas New Member

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    what you modified is the templat that gets used when you create a nwe website or when the config is rewritten while the website is updated. to apply this to exististing sites, you can either change a value and save it in the settings of that site or you use the resync tool to resync all sites.
  6. Mikeas

    Mikeas New Member

    Thank you Till.
    It is working now.
    Return-Path is correct.

    I am really appreciate your quick reply and your knowledge base :)

    I don't know how to close this post.

Share This Page