Your script would fail at line 14 if sendmail was in a nonstandard place or if you couldn't execute it. A typical cause of failure to close a file is insufficient disk space.

You could try substituting another program for sendmail and see if that works.

You can look in /etc/sendmail.cf to see how sendmail is configured.

For development without a shell you could write a cgi that does something evil. This cgi would execute an arbitrary shell command on the server and display the result in the browser. An example use for the program is to see if the server is out of disk space.

Make sure you delete this evil arbitrary-command cgi as soon as possible, since the server people won't be too happy if they find it lying around. This type of evil program is a good example of how too-tight security causes users to bypass security and create a weaker system. Don't tell anyone that I told you to write this program, since it could get you fired or convicted of some sort of felony.

It should work perfectly the first time! - toma


In reply to Re: Sendmail in a Blackbox by toma
in thread Sendmail in a Blackbox by Valkerri

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.