Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2001
    Posts
    707

    Default nobody@hostname in php mail() Return-Path

    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. #2
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    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

  3. #3
    Member
    Join Date
    Aug 2001
    Posts
    707

    Default

    [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. #4
    Member rpmws's Avatar
    Join Date
    Aug 2001
    Location
    back woods of NC, USA
    Posts
    1,858

    Default

    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.
    Just keeping my "eye" on things....
    R. Paul Mathews
    RPMWS - diehard cPanel Nutcase

  5. #5
    Member
    Join Date
    Aug 2001
    Posts
    707

    Default

    [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.

Similar Threads & Tags
Similar threads

  1. How do I set the Return-Path, etc mail headers via PHP?
    By simpleupdates in forum E-mail Discussions
    Replies: 2
    Last Post: 06-18-2008, 03:01 PM
  2. Setting Return Path and recevied from in php
    By lloyd_tennison in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 09-27-2005, 04:45 AM
  3. Reject mail without a return-path address
    By alanpollenz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-17-2003, 05:48 AM
  4. modify Return-Path: with php mail()
    By h2oski in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 11-21-2003, 05:19 AM
  5. Incorrect return-path for all mail sent using NeoMail.
    By techs5 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-03-2003, 11:13 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube