The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mail bounced from "nobody" coming back to admin

Discussion in 'E-mail Discussions' started by EMS, Sep 21, 2004.

  1. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    I tried to search for this but the forum search doesnt allow the word "nobody" !!??

    Anyway,

    Currently on one of our servers, mail sent by scripts that is bounced, is sent to the server admin contact. I thought normally this was either returned to the reply address in the script (i.e admin contact on a forum) or "black holed".

    What can I do to switch this off ?

    Sorry if its a newbie question but this is a new problem to me.
     
  2. EH-Chris

    EH-Chris Member

    Joined:
    Sep 20, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    We had the same problem on our servers.
    If you log into and go to Update Apache -> Load Previous Config -> scroll to the bottom
    there will be a box for phpSuExec check that box and rebuild Apache. It fixed the mail problems for us. Should work for you too.
     
  3. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    You have to set your server to prevent mail sent from 'nobody'.

    This will cause problems however if your users need to send mail generated by perl/php scripts.

    You will need to enable suexec (perl) and/or phpsuexec (php) if you want script generated mail to be sent using the users identity.
     
  4. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    The server is not using phpsuexec and the setting to disallow nobody to send mail is disabled (allow). The suexec module is included in apache.

    To clarify the situation...

    Its only bounced mail that is coming back. Mail sent by "nobody" is being sent as normal (as far as I can tell) but undelivered mail that has been sent by nobody is returning to the server rather than the reply to address - as follows.....

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    removed@yahoo.co.uk
    SMTP error from remote mailer after end of data:
    host mx1.mail.ukl.yahoo.com [195.50.106.7]: 554 delivery error:
    dd This user doesn't have a yahoo.co.uk account (removed@yahoo.co.uk) [0] - mta125.mail.ukl.yahoo.com

    ------ This is a copy of the message, including all the headers. ------

    Return-path: <nobody@server4.removed.com>
    Received: from nobody by server4.removed.com with local (Exim 4.42)
    id 1C9vKn-0007KM-9K
    for removed@yahoo.co.uk; Wed, 22 Sep 2004 01:50:13 +0100
    To: removed@yahoo.co.uk
    Subject: Email Confirmation
    From: INFO@removed.COM
    Reply-To: INFO@removed.COM
    Message-Id: <E1C9vKn-0007KM-9K@server4.removed.com>
    Date: Wed, 22 Sep 2004 01:50:13 +0100

    The from and reply to addresses are a domain on the server but the delivery failures are coming back to the server.
     
  5. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Is there a question hidden somewhere in there?

    A method for preventing your problem was described. Obviously, the return path is your issue not the reply to address ;)

    If your scripts are running as 'nobody' and your scripts are generating the mail, then the mail is being generated by 'nobody' regardless of what headers you may inject via your script.
     
  6. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Out of 11 cpanel servers, this is the only one doing this so there has to be something different on this server - however, it only recently started happening and had been fine for months.

    SarcNBit, please read the posts here - You said that we have set our mail to prevent mails sent from nobody - we havent. Also - we are not using phpsuexec on any of our servers and we dont intend to. I am fully aware that the return path is the problem.

    Does anyone else have any ideas ?
     
  7. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    EMS please reread my first reply (pay particular attention to the word 'to' following the word 'have'). ;) I never speculated as to how your server was configured.

    There are possible (albeit unlikely) explanations as to why you are not seeing this on another identically configured server. The other servers may not be running php based mail scripts (suexec would cover the perl based scripts) or maybe the recipients of the other php based scripts are all valid.

    I was not trying to offer an explanation, I was trying to offer a solution. There is always more than one way to skin a cat. I hope you find a solution that suits you. :)
     
  8. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    With due respect, although I appreciate your input - you havent offered a solution. I need to find out why this is happening first, so that I can fix it. There are many php scripts that use this method of sending mail and we dont want to restrict our customers from doing this.

    Anyone else have any suggestions as to how to troubleshoot the issue ?
     
  9. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
  10. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    You don't have "nobody" mail set to forward in WHM, do you? If so, remove it.
     
  11. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
    what.. in the tweak settings?
     
  12. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    No... look in WHM for System Mail Preferences, I believe it is called. You should forward root mail, but the rest I'd only forward if you think you are having a problem and need to check things.
     
  13. d-woo

    d-woo Well-Known Member

    Joined:
    Aug 9, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Aric1
    in WHM under Server Setup>>Change System Mail Preferences I have nobody's mail forwarded to :blackhole:
    but, like EMS I was still receiving bounced email and it was plugging up my mail queue.

    My bounced email was going to user@hostname

    e.g. myusername@server.domain.com

    EMS what I did was this.

    1. Add the hostname.domain.com to /etc/localdomains if it isn't already in it
    then
    2. Create an /etc/valiases/hostname.domain.com and add the following line:

    *: :fail:

    3. then restart Exim
     
    #13 d-woo, Oct 26, 2004
    Last edited: Oct 26, 2004
  14. ladydi711

    ladydi711 Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    120
    Likes Received:
    3
    Trophy Points:
    18
    http://us2.php.net/function.mail

    See example 3; the extra parameter -f

    I just helped a customer solve this same problem. Now all the returned emails are going to the sender of the mail rather than the server admin (me!).
     
  15. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    Up until about a month ago, bounced nobody mail was routed to the proper reply-to address via some sort of exim filter, however that has now ceased to work. I am not sure what update caused it to die, but it has. At one time this did work, without suexec or phpsuexec, it did work. I had even set up a .forward file in the /root directory that would filter bounced mail to the correct sender, but that no longer works either. So I really don't have an answer, but I do understand and can confirm what the original poster is saying.
     
  16. JC

    JC Well-Known Member

    Joined:
    Nov 6, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    This was happening on my boxes too.

    On one of them, i had a copy of exim.conf dated August (so before the upgrades changed things).

    I checked the exim.conf used now and exim.conf of the previous version.
    Found this on the older file which doesn't exist on the new one (that might explain the behaviour):

    Code:
    
    ######################################################################
    #                      REWRITE CONFIGURATION                         #
    ######################################################################
    
    # There are no rewriting specifications in this default configuration file.
    
    begin rewrite
    
    nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs
    cpanel@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs
    
    
    I'm going to try changing the new file adding this part.
    Will I have to manually add it or is there a place in the Exim Configurator where we can do this so it doesn't get changed with updates?

    Thanks
     
  17. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    Along with what JC posted above, the following must be done as well:

    You have to add those lines to the rewrite conditions but for it to work you need to modify the following:

    At the top of exim.conf you will find:
    local_from_check = true
    remove it - or comment # it

    Then go down to:
    #nobody as the sender seems to annoy people
    untrusted_set_sender = *

    remove it - or comment # it
    add this instead:
    no_local_from_check

    Save restart exim - now it really works :)

    JC sent me that, so I am not taking credit for it, just posting it here so I can point Cpanel staff to the solution.
     
  18. damainman

    damainman Well-Known Member

    Joined:
    Nov 13, 2003
    Messages:
    515
    Likes Received:
    0
    Trophy Points:
    16
    Will cpanel be implementing this, or we need to do this manually?
     
  19. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
  20. McFunk

    McFunk Registered

    Joined:
    Apr 1, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    When this is done, will it work if you have "prevent user nobody from sending mail" checked in the tweak settings?
     
Loading...

Share This Page