Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    May 2002

    need help on web server...

    hi there, i've made my own web server and i've put web page on it...
    but i've one problem- in web page i've guestbook (you put your name, e-mail...) and then this information is sent to my e-mail... but thats the problem - i don't get this message on my e-mail
    the guestbook is made with perl and CGI
    Some guy told me that i need send mail program on my machine, but what kind of program? do i need to put mail server too???
    could anybodey explain where is the problem and how can i solve it? (if i need some software - please tell me wich(the name of it) ) or give me some links where to look for answers..

  2. #2
    Join Date
    Jul 2001
    kdraugsk it depends on where the email is supposed to go. If you are trying to deliver it to your local machine (username@localhost.localdomain or something else that is your machine) then you need to have an smtp server and pop server running on your web server such as sendmail (www.sendmail.org) or postfix (www.postfix.org). This is assuming that you are running a linux/unix style box, if it is windows then there are other options. As long as this site is going to be a small site the best choice would be to send the emails to an internet email address such as username@hotmail.com or something like that. You can get free email accounts from almost anywhere.

    However your webserver will have to have an email server or client that is allowed to send outbound emails. Without too much information as to what the cgi script is doing I can't really give you a definate answer. Try putting your server type, and the cgi script on your next post and that would be more help for those of us who are trying to help.

    Hope this sheds some light on it for you.

    It\'s a long life, until you die

  3. #3
    Junior Member
    Join Date
    May 2002
    hi again,
    i'm using web server named Xitami v2.5b4 and the scrip that i'm using is:
    fot HTML:
    <TITLE>Guestbook Script</TITLE>
    <FORM METHOD="post" ACTION="/cgi-bin/guestbook.cgi">

    <INPUT NAME="name" SIZE=50 TYPE="text"> Your Name

    <INPUT NAME="email" SIZE=50 TYPE="text"> Your E-Mail Address

    <INPUT TYPE="hidden" NAME="submitaddress" VALUE="kdraugsk@inbox.lv">
    Write to me below:

    <TEXTAREA NAME="feedback" ROWS=10 COLS=50></TEXTAREA>

    <INPUT TYPE=submit VALUE="SEND">


    and for cgi:

    # That is the path to PERL just above It MUST be first in the script
    # The following accepts the data from the form

    if ($ENV{'REQUEST_METHOD'} eq 'POST') {

    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

    @pairs = split(/&/, $buffer);

    foreach $pair (@pairs) {
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

    $FORM{$name} = $value;

    # The following sends the email

    open (MESSAGE,"| /usr/lib/sendmail -t");

    print MESSAGE "To: $FORM{submitaddress}\n";
    print MESSAGE "From: $FORM{name}\n";
    print MESSAGE "Reply-To: $FORM{email}\n";

    print MESSAGE "Subject: Feedback from $FORM{name} at $ENV{'REMOTE_HOST'}\n\n";
    print MESSAGE "The user wrote:\n\n";
    print MESSAGE "$FORM{feedback}\n";
    close (MESSAGE);


    #The following creates the Thank You page display

    sub thank_you {

    print "Content-type: text/html\n\n";
    print "<HTML>\n";
    print "<HEAD>\n";
    print "<TITLE>Thank You!</TITLE>\n";
    print "</HEAD>\n";
    print "<BODY BGCOLOR=#FFFFCC TEXT=#000000>\n";
    print "<H1>Thank You!</H1>\n";
    print "\n";
    print "

    print "<H3>Your feedback is greatly appreciated.
    print "

    print "</BODY>\n";
    print "</HTML>\n";

    this is an exaple shown on HTMLgoodies.com
    and i'm using e-mail that is on other server (free e-mail...)
    thanx for help

  4. #4
    Senior Member
    Join Date
    Apr 2002
    It could be more easy if your CGI script could write directly those info on your hdd. it would use less ressources and it would be a better things to secure your server (smtp server are often the first attacked).
    Life is boring. Play NetHack... --more--

  5. #5
    Senior Member
    Join Date
    Nov 2001
    I agree with KissCool, just save it locally.

    As for your webserver... can't you use Apache like normal folks?

  6. #6
    Join Date
    Oct 2001
    Yeah, Why have the information sent to you by email... And since your not on Linux you cant recieve the emails unless you have a SMTP server up =)

  7. #7
    Join Date
    Apr 2002
    whats your ip address?

  8. #8
    Join Date
    Jun 2002
    2 things. First of all, xitami is a really good server, configurable, you can pick how much memory you want to allocate, works with anything, coldfusion, php etc. It has almost no known exploits. It is also free, and a small download, it has a nice GUI, and web based administration. Really good server. And as for mail, you should probably setup an smtp server, or just save the entries locally to a database. Your ISP may let you use theirs, mine did for my web hosting needs, they were pretty nice about it, ask yours.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.