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


In reply to Re: Using "nobody" to send e-mail by tachyon
in thread Using "nobody" to send e-mail by db2admin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.