Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

nobody@hostname in php mail() Return-Path

Discussion in 'E-mail Discussion' started by moronhead, Mar 21, 2002.

  1. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    Undeliverable mail sent by a user with PHP mail() gets returned to nobody@hostname instead of the user. That's because the Return-Path always seems to be set to nobody@hostname no matter what headers are used in mail() to try to redirect the Return-Path. We tried Errors-To, Return-Path, &-f$sender& so far with no success.

    Has anyone found a way to change the Return-Path?
     
  2. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Spain
    About the -f command line option and Exim:

    http://www.exim.org/exim-html-3.20/doc/html/spec_5.html#SEC73

    http://www.exim.org/exim-html-3.20/doc/html/spec_11.html#SEC393

    http://www.exim.org/exim-html-3.20/doc/html/spec_11.html#SEC251
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    [quote:a445a56e3e][i:a445a56e3e]Originally posted by Juanra[/i:a445a56e3e]

    About the -f command line option and Exim:

    http://www.exim.org/exim-html-3.20/doc/html/spec_5.html#SEC73

    http://www.exim.org/exim-html-3.20/doc/html/spec_11.html#SEC393

    http://www.exim.org/exim-html-3.20/doc/html/spec_11.html#SEC251


    [/quote:a445a56e3e]
    Very useful. Many thanks.

    Setting this in exim.conf:

    untrusted_set_sender = true

    enabled &-f$sender& in PHP mail()

    I'm not yet sure if there are any security implications with this but it worked.

    Best regards,

    Norman
     
  4. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    7
    Trophy Points:
    318
    Location:
    back woods of NC, USA
    so do the headers look like you want them to now? I have been having this problem for a while. Can the script specify what the header looks like now? .. I know before certian things never worked.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    [quote:326ff3f535][i:326ff3f535]Originally posted by rpmws[/i:326ff3f535]

    so do the headers look like you want them to now? I have been having this problem for a while. Can the script specify what the header looks like now? .. I know before certian things never worked. [/quote:326ff3f535]
    The -f parameter in PHP mail() is working correctly with the above fix. It is redirecting the Return-Path to the address set in that parameter. Before that fix the Return-Path was always being set to nobody@hostname so any undeliverable mail used to end up returned to us instead of the user.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice