SourceForge has been redesigned. Learn more.

need to customise postfix return path as its showing weird email.

  • craigedmonds

    craigedmonds - 2013-08-13

    I have an issue with the return path in the headers and dont know how to fix it.

    When an email is sent from a form on our server, the return path is being returned as..

    Return-Path: "www-data@server2"

    However, I need the return path to be like this so that we can retrieve any bounces.


    Inside the file I have everything set like this:

    myhostname =
    myorigin =

    So i am not sure why the part "www-data@server2" is being added to the return path right now.

    Is there not a simple directive I can put into the which simply tells the return path what it should be be?

    Kindest Regards
    Craig Edmonds

    Any ideas on this one?

  • Christian Boltz

    Christian Boltz - 2013-08-25

    This has nothing to do with postfix, it's a PHP setting.

    To set the envelope from to "", you add this to your apache config (I recommend to use a different value for each virtual host):

    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f"

    If you want to set the same address for your whole server, you can also set it in sendmail_path in php.ini.


Log in to post a comment.