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!

Its possible change nobody@ ?

Discussion in 'General Discussion' started by leorevenda, Nov 15, 2005.

  1. leorevenda

    leorevenda Active Member
    PartnerNOC

    Joined:
    Jan 24, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    156
    Hello,

    Its possible change nobody@ origin of messagens sended by php scripts? I have problems with many providers blocking nobody@domains.com

    Thank you
     
  2. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    156
    In the top box of the Advanced Exim Configuration Editor, add these lines:

    Code:
    untrusted_set_sender = *
    local_from_check     = false
    local_sender_retain  = true
    Then in the box underneath "REWRITE CONFIGURATION", add this line:

    Code:
    nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    870
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    what's this actually do?
     
  4. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    166
  5. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    166
    Wouldn't this reveal the username then? I find it hard to justify changin nobody to username just because some ISP's are being too strict.
     
  7. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    166
    That's a very valid point. Fortunately, I've rarely had to deal with spammers on our servers since we pick our customers with extra care. I understand spammers don't have to be our customers and can use the server to do their job. :)
     
  8. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,750
    Likes Received:
    86
    Trophy Points:
    353
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    for all you copy & pasters there is a space in the fail} "fai l}" above

    you have to close the gap to get it to run

    and just a side note it will enter the reply to address in the script if it has one which it should
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. andyf

    andyf Well-Known Member

    Joined:
    Jan 7, 2002
    Messages:
    246
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    UK
    I'd question whether it's a good idea to let the user specify the envelope sender. A more acceptable method would be to have the envelope sender set to system_username_of_sender@senders_main_domain.tld

    Then at least if someone spams you will know because the messages are returned to you.
     
  10. pross

    pross Well-Known Member

    Joined:
    Mar 14, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    156
    I'm not sure this is working properly...

    if i have a mail() with $to $subject and $message and $from the $from gets rewritten as the from address by exim..ok good so far..now if i do the same mail($to,$subjet,$message); without the $from exim now just sends it as nobody at servername.com so is this right?
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Yes, that's how it works. If you set the From: field it rewrite the header record, otherwise it sets it as it would do normally.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    McKinney, Texas, USA
    I experience this error when I implement the solution mentioned above

    Configuration file has an invalid syntax. Please try again.
    Mail Scanner exim.conf updating...2006-03-07 08:04:49 both local_from_check and local_sender_retain are set; this combination is not allowed
    Exim version 4.52 #1 built 16-Aug-2005 05:03:50


    I remark the local_sender_retain line to get by error but the local_from_check is found in a non-editable area. This seems like it defeats the purpose. I know I can exit the actual exim config file but is this really what needs to happen to make this solution work?

    Just Being cautious...

    Thanks,
    -greg
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,750
    Likes Received:
    86
    Trophy Points:
    353
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you have as space in your fail you copied & pasted "fai l"


    see my post above
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    3
    Trophy Points:
    168
    This is great, but still a lot of "nobody" spam is being sent, e.g. from a simple php newsletter type script, that is until we find it and delete it.

    Here's the main header in such a script that goes out with the email:

    Received: from nobody by servername.ourdomain.com with local (Exim 4.52)

    So how can I tweak this:
    nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs

    To also catch this:
    Received: from nobody by servername.ourdomain.com with local (Exim 4.52)


    By the way, the actual from header is usually something like this:
    From: PayPal Inc. <Service@PayPal.C0M>


    -----

    Here's my guess, but I hesitate to try this in fear of breaking exim:
    "from nobody" "${if !eq {$header_Received:}{}{$header_sender:$header_Received:}fail}" Fs


    Or would I need to use something like:
    from+nobody "${if !eq {$header_Received:}{}{$header_sender:$header_Received:}fail}" Fs
     
  15. ffeingol

    ffeingol Well-Known Member
    PartnerNOC

    Joined:
    Nov 9, 2001
    Messages:
    215
    Likes Received:
    1
    Trophy Points:
    318
    cPanel Access Level:
    DataCenter Provider
    This thread is quite old and I just wanted someone to verify that this is still applicable with "new" cPanel, "new" exim configurations etc.

    TIA,

    Frank
     
  16. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    3
    Trophy Points:
    168
    Hi Frank,

    This is how I got it to work:

    WHM ---> Exim Configuration Editor ---> Advanced Editor ---> REWRITE CONFIGURATION (then insert this in the field just below):

    nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs
     
  17. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    166
    Remember;

    fai l}"

    Needs to be fail ....this forum puts a whitespace in the code
     
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