[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] sendmail/cgi script problem



It sounds like you have everything in order..  Here's a paste from a 
script I use to send mail to users or that my billing .cgi uses to 
send mail.  Hopefully it may give you some insight. It works for me 
on my RAQ3:


--------snip----------

# Matt's replacement sendmail routine
# SUB: Send E-mail
# UNIX Sendmail Version 
# 
#
# Takes:
# (To, Subject, Reply-To, Mail Program (ie. sendmail), Message) 
#****************************************************************
sub sendemail {
$TO=$_[0]; @TO=split('\0',$TO);
$SUBJECT=$_[1];
$REPLYTO=$_[2];
$REMOTE = $_[3];
$THEMESSAGE = $_[4]; 
open(S, "|$REMOTE -t"); 
print S "To: $TO[0]\n";
# print S "From: <SMTPMAIL>\n";
print S "From: billing\@$shortname\n";
print S "Subject: $SUBJECT\n";
print S "CC: billing\@$shortname\n\n"; 
#print S "Reply-To: $REPLYTO\n\n"; 
# Print the body
print S "$THEMESSAGE\n";
print S "\n";
print S ".\n";
close (S);
}   #  sendemail

------snip--------
it's reletave to usr/sbin/sendmail

Regards, Lennie Core







I have a raq3 and have a simple perl email script set-up for debugging 
purposes. The only things that this particular script does is send an email 
to me, and upon completion, prints "done" to the screen.  The reason I am 
using this script is because I have had numerous problems getting 
"formmail" type scripts to function properly on the raq, and so I am down 
to the bare-bones with this script to try and figure out the problem.

Here are the details:

1) when executed from the command line, the script does send an email to 
dan@xxxxxxxxxxx, as intended. system9.com is one of the domains hosted on 
the raq3.

2) when executed from the web, the script executes, prints "done" to the 
screen, but does not send the email. HOWEVER, when the script is altered to 
send email to a domain NOT hosted on my raq3, it does send the email when 
executed via browser.

3) other "formmail" type scripts that i've tried to use have all done the 
same thing:  all will send email to any domain, regardless of whether that 
domain is hosted on my raq3, when executed from the command line. however, 
no mail is sent do any domain that is hosted on my raq3 when the scripts 
are executed via browser.

4) my hosting company (who handles the dns) has confirmed and re-confirmed 
that dns, mx, and reverse dns are setup for all domains on the raq.

So basically, the problem is that I am unable to send mail via script to 
any domain hosted on my raq3 when using a cgi that requires input from a 
web-based interface.  All of the domains on the raq are able to 
send/receive email using desktop email clients, and email can be sent 
to/from all the domains on the server in this fashion.

Permissions on the script are 755, the script and the cgi-bin are owned by 
the domain administrator (not the server administrator), and "group" is set 
as the default group for the domain.

I've looked through the cobalt user archives, and have found people with 
similar problems, but none of the solutions offered has worked in my case.

Any help would be appreciated.

thanks. 

_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users

---------------------------------------------------
             Lennie Core, Ceo
       Coreave.com, Design & Hosting
               757-442-6240
            http://coreave.com