in reply to Using "nobody" to send e-mail
Sendmail runs suid so if your webserver is running as nobody it will send the mail as that user. There are several options. First we are assuming that it is the real issue as there are other possibilities.
You could simply run the webserver as another user like 'somebody' for example. The changes required should be fairly minimal. Just change this in /etc/httpd/conf/httpd.conf
User somedoby Group somebody
You may or may not need to fix some perms on your webdirs to keep it happy.
Another approach is to change the name string associated with user nobody which will retain the nobody UID/GID so you don't get perms issues. You could do it by editing /etc/passwd /etc/shadow /etc/group. Unfortunately anything else looking for user nobody will now be out of luck so don't do that.
You could look at bypassing sendmail and using Net::SMTP to send the mail. MIME::Lite will happily use it.
Finally you can fool around with the /etc/sendmail.cf. See this article and setting U=/DefaultUser/RunAsUser.
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using "nobody" to send e-mail
by ikegami (Patriarch) on Oct 30, 2004 at 19:40 UTC |