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.

The scoop on this NOBODY stuff!

Discussion in 'General Discussion' started by sexy_guy, Apr 19, 2003.

  1. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Here is the lowdown on this thing

    If you have Installed phpsuexec
    and checked the option that says do not allow users to send email as nobody.

    I get unroutable domain errors! :rolleyes:

    If i uncheck do not allow users to send mail as nobody then;
    Unroutable errors go away but php scripts send out email as nobody. :rolleyes:

    If i try to send email from my box that doesnt have phpsuexec installed then mail going to a box that has phpsuexec installed i will get this error.

    The logs say; ken@teleis.com T=remote_smtp defer (0): SMTP error from remote mailer after end of data: host teleis.com [207.xx.xxx.xxx]: 451 rejected: temporarily unable to verify sender address <nobody@myhost.com>

    So whats the solutions here?
     
  2. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    I still dont get why mail leaves as johy@srv01.fasterver.com. srv01.fastserver.com is the hotname of my box. Why cant it be the domainname of the user? Why is it changed to my hostname. My users are questioning this when they look in their email header info, return path.
     
  3. Stenny Chong

    Stenny Chong Well-Known Member

    Joined:
    Jun 12, 2002
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    When there is a problem, there is always a solutions.

    I have phpsuexec installed, and exim running properly without single unroute domain error.

    I've "Prevent Nobody" checked.

    add below to your exim.conf file....but i'm not sure whether it work for you but work for me.

    always_bcc = true

    and restart exim.

    Good luck.
     
  4. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK





    I had the same problem after doing all that as well. I had to comment a line in /etc/exim.conf. it was the "sender_verify = true" line and then restarted Exim. It worked fine after that.


    # primary_hostname =
    deliver_queue_load_max = 3
    #sender_verify = true
    headers_sender_verify = true
    auto_thaw = 1h
    prohibition_message = "${lookup{$prohibition_reason}lsearch\
    {/etc/eximrejects}{${expand:$value}}}"



    If you are sending from one Cpanel to another you should do that on both.
     
  5. howard

    howard Well-Known Member

    Joined:
    Apr 20, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Because when its when called by the /usr/sbin/sendmail symlink or /usr/sbin/exim it has no idea what domain assoicated with the user calling it maybe, see http://forums.cpanel.net/showthread.php?s=&threadid=7966
    on howto allow people to set other addresses so that they can set the return-path in their scripts if they are worried about the return-path (although myself i can't see much reason for it unless you want to get bounces from scripts etc)
     
  6. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    It doesnt matter. Lord, if i send out email from a php script and the msg bounces i expect it to come back to me telling me that such and such messages sent could not be delievered. Since i am the sender the return path be that php script, squirrelmail or whatever should have the proper return path. This is ridiculous!
    Ensim, Plesk Hsphere can all do it. Howcome? Howcome we never had this problem with Ensim for eg?
     
    #6 sexy_guy, Apr 21, 2003
    Last edited: Apr 21, 2003
  7. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    php by default sends mail as username@localhost. As we all know apache runs as nobody, and so that means php runs as nobody (unless you run phpsuexec). So when you use mail(), it will sendmail from nobody@localhost which turns into nobody@server.hostname.com This is normal.

    Now if you have phpsuexec enabled now php runs as the user. Which means that by default mail() will send mail as username@server.hostname.com. It will not send email from their domain name unless you give mail() more params.


    I tested a plesk machine as well and got the same results. This is how php is suppose to work. If you dont like it bitch at them.

    If you want to change where mail is sent from maybe add a line in your php files that has somthing liek this...

    ini_set(sendmail_from, "Email@Address.com");

    or i think this works too...

    ini_set(sendmail_from, "Domain.com");
     
  8. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    You can also set this in a vhost directive in httpd.conf. This way the customers don't have to add the lines themselves.

    Something like this (I'm not 100% sure) :

    php_admin_value sendmail_from, domain.com

    From what I can remember this doesn't work with Exim though, unless you make 'nobody' a trusted user.

    I'll try it again tomorrow.
     
  9. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    yep that would work.

    What you do with the php flag though should matter what MTA you use. As as long as php sends mail from a domain that it see's as being local it should work.

    Unless sender_verify = false
     
  10. rnh

    rnh Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    That's right it doesn't work in Ensim, neither does

    php_admin_value sendmail_path "/usr/sbin/sendmail -f user@domain.com"

    ...because apache runs as nobody, so how do we do this trusted user thing? I've been searching and searching and have found nothing, and that's actually how I found this thread was searching for how to add a user to the trusted user list.

    Thanks.

    cPanel.net Support Ticket Number:
     
  11. howard

    howard Well-Known Member

    Joined:
    Apr 20, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
  12. hostultra

    hostultra Well-Known Member

    Joined:
    Aug 21, 2002
    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    16
    Cant the mail program get the username from the PATH of the php script which executed the sendmail?

    like if the path is /home/someuser/public_html/mailscript.php then the username would be someuser

    Surely the mailscript can read the variables and get the path to what executed it?

    At the very least, including the path of the script that sent the mail in the X-Antiabuse header would be very useful :)
     
  13. rnh

    rnh Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    Even that didn't work for me... I'm on FreeBSD though.

    I put nobody, cpanel, and the user's names as well all in the trusted users list at the same time and Exim still doesn't accept the -f argument.
     
  14. howard

    howard Well-Known Member

    Joined:
    Apr 20, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Have you tired all(?) or any(?) of the following? (sorry if this seems obvious not sure what you tried already?)

    have you been restarting exim after each change?

    does /usr/sbin/exim -bP trusted_users show the users you have added?

    Have you tired using the -f command from the command line (e..g /usr/sbin/exim -f address@example.com destination-address@example.com )

    hostultra: have you tired looking into using /usr/local/cpanel/bin/sendmail (if its there in your copy) and the apache logs the cpanel sendmail binary logs various like below then passes it onto exim

    5/26/2003 0: 8:13 sendmail[14114]: called by pid 13933 uid 253254 (/usr/bin/perl) CWD /home/rakdev/public_html/ CMDLINE /usr/bin/perl

    cPanel.net Support Ticket Number:
     
  15. rnh

    rnh Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    Thank you very much for your help Howard. Sorry if I'm missing something obvious here but I just can't seem to get this working.

    # /usr/local/sbin/exim -bP trusted_users
    trusted_users =
    # locate exim.conf
    /usr/local/cpanel/bsdconf/exim/exim.conf
    # cat /usr/local/cpanel/bsdconf/exim/exim.conf |grep trust
    trusted_users = nobody:cpanel:x80x
    # /etc/rc.d/init.d/exim stop
    exim antirelayd spamd
    # /etc/rc.d/init.d/exim start
    exim antirelaydCould not create INET socket: Bad file descriptor IO::Socket::INET: Address already in use
    # /usr/local/sbin/exim -bP trusted_users
    trusted_users =

    I have my trusted users list variable defined right at the top of /usr/local/cpanel/bsdconf/exim/exim.conf

    Is it possible that I need to put trusted_users somewhere else within the exim.conf? that is the only exim.conf file located on my machine and it has been overwritten on several updates...

    Thanks!
     
  16. howard

    howard Well-Known Member

    Joined:
    Apr 20, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    that would seem to indicate that its not picking up the trusted_users section for some reason, does /usr/local/sbin/exim -bP configure_file match the /usr/local/cpanel/bsdconf/exim/exim.conf location you specifed (just on the offchance that exim & you are looking at different configs somehow)

    as long as its before the ###TRANSPORTS CONFIGURATION#### section it shouldn't matter where its put

    cPanel.net Support Ticket Number:
     
    #16 howard, May 25, 2003
    Last edited: May 25, 2003
  17. rnh

    rnh Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    # /usr/local/sbin/exim -bP configure_file
    /usr/local/etc/exim/configure



    Oh man! Howard, I could not thank you enough! That's it, that's what the problem was.

    Now exim accepts the -f flag! thanks so much!

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page