Jump to content

Sendmail with "prevent user "nobody" enabled?" Tweak Settings VPS? Help!


logicsound

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.