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

2013-08-13
2013-08-25
  • 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"@our_domain_name.com

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

    Return-Path: server2@our_domain_name.com

    Inside the main.cf file I have everything set like this:

    myhostname = server2.our_domain_name.com
    myorigin = server2@our_domain_name.com

    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 main.cf which simply tells the return path what it should be be?

    Kindest Regards
    Craig Edmonds

    Any ideas on this one?

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

    To set the envelope from to "user@example.com", 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 user@example.com"

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