logicsound Posted December 13, 2010 Share Posted December 13, 2010 I have a vps server at hosting.com with multiple domain and websites. I have one domain that is using 1 email address and another domain that has a webform with the following code below. <?php $email = $_POST['EMAIL']; $mailto = "user@domain.com, user@domain.org"; $mailhead = "FROM: LOI<user@domain.org>"."\r\n"; $mailhead .= "Reply-To: user@domain.org"."\r\n"; $mailhead .= "CC: ".$email; $mailbody = "Values submitted from LOI:\n"; while (list($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; } mail($mailto, $mailsubj, $mailbody, $mailhead); header("LOCATION: letter.html"); ?> There is a setting on the VPS in “tweak settings” Prevent the user "nobody" from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.) If this setting is turned off (default) my sendmail form works great but the user on the other domain gets massive amounts of spoofed ndr emails, I have tried every spam setting in the vps to stop but nothing works, the only thing that works is turning the above setting to Enabled but then my sendmail does not work!!! So I need a solution that allows me to use sendmail with this setting enabled...Can someone please explain to me how I can do this. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/ Share on other sites More sharing options...
trq Posted December 13, 2010 Share Posted December 13, 2010 What exactly does this setting do? VPS's should be administered from the cli not from some web based interface. It's the only way to know what's going on. Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146864 Share on other sites More sharing options...
logicsound Posted December 13, 2010 Author Share Posted December 13, 2010 I dont understand your question? this setting is on the whm in tweak settings and it prevents the user "nobody" from sending mail. If I enable it my web forms dont work because I guess my sendmail code uses nobody. If I leave it disabled my one user that uses email on this server gets hammered with spoof bounce back emails Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146871 Share on other sites More sharing options...
trq Posted December 13, 2010 Share Posted December 13, 2010 I dont understand your question? What does the setting actually change on the system? Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146873 Share on other sites More sharing options...
logicsound Posted December 13, 2010 Author Share Posted December 13, 2010 I have no idea? I am just a network guy that got thrown into maitaining this webserver that has 4 websites on it. But I would guess that it stops the user "nobody" from sending mail which I guess is what sendmail uses. I am in no way a programmer. So i guess I need to find a way to send mail from forms without using "nobody" this could be very painfull if I have to change all the code. over 15 forms. or I need to know how I can track and stop the nobody spammer. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146880 Share on other sites More sharing options...
trq Posted December 13, 2010 Share Posted December 13, 2010 this could be very painfull if I have to change all the code. This has nothing to do with your code but your server configuration. Do you have access to and the ability to use the servers shell? Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146904 Share on other sites More sharing options...
logicsound Posted December 13, 2010 Author Share Posted December 13, 2010 yes I can get access to anything on the server.....scary! Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1146920 Share on other sites More sharing options...
logicsound Posted December 28, 2010 Author Share Posted December 28, 2010 Ok, so after weeks of trying to figure this out I finally did, Was really hoping someone would point me in the right direction but in the end had to struggle and find it out the old fashion way.. So if anybody else has this issue this is what I had to do. What you need to do is edit the sendmail_path in /usr/local/lib/php.ini to = specify a from address. An example would be sendmail_path =3D "/usr/sbin/sendmail -t -froot@domain.com" Thanks everyone for the help with my other issues...not sure why no one could tell me how to fix this one, seemed pretty easy once I found it. Quote Link to comment https://forums.phpfreaks.com/topic/221546-sendmail-with-prevent-user-nobody-enabled-tweak-settings-vps-help/#findComment-1152178 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.