Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unix and sendmail

Status
Not open for further replies.

jr7138

Technical User
Jun 10, 2002
3
US
I just upgrade to MacOS X 10.1.5 and the sendmail app of UNIX will not send the following script to said email address client.

#!/usr/bin/perl

# Use Pre-Build CGI Routines
# ----------------------------
use CGI;
$q = new CGI;

# Set Initial Variables
# -----------------------
$recipient_email = 'juan.ramirez@txmail.sbc.com';
# $recipient_email = 'tony.colter@sbc.com';
$mail_file = '/Library/WebServer/CGI-Executables/.mail/' . time();

# Set Form Variables
# --------------------
$date = $q->param('date');
$nominee_name = $q->param('nominee_name');
$team_names = $q->param('team_names');
$title = $q->param('title');
$work_phone = $q->param('work_phone');
$work_address = $q->param('work_address');
$email = $q->param('email');
$sup_name = $q->param('sup_name');
$sup_phone = $q->param('sup_phone');
$gmcc_department = $q->param('gmcc_department');
$gs_department = $q->param('gs_department');
$nominators_name = $q->param('nominators_name');
$nominators_title= $q->param('nominators_title');
$nominators_phone = $q->param('nominators_phone');
$nominators_department = $q->param('nominators_department');
$sup_mgr_app_nomination = $q->param('sup_mgr_app_nomination');
$customer_service = $q->param('customer_service');
$rev_generation = $q->param('rev_generation');
$above_beyond = $q->param('above_beyond');

# Send User To Thank You Page
# -----------------------------
print "Location:
# Send Email To The Recipient
# -----------------------------
open (MAILFILE,">$mail_file");
print MAILFILE "Nomination form:\n";
print MAILFILE "Date: $date\n";
print MAILFILE "Nominee's Name: $nominee_name\n";
print MAILFILE "Team: $team_names\n";
print MAILFILE "Title: $title\n";
print MAILFILE "Work Phone: $work_phone\n";
print MAILFILE "Work Address: $work_address\n";
print MAILFILE "eMail: $email\n";
print MAILFILE "Supervisor's Name: $sup_name\n";
print MAILFILE "Supervisor's Work Phone: $sup_phone\n";
print MAILFILE "GMCC Department: $gmcc_department\n";
print MAILFILE "Global Solutions Department: $gs_department\n";
print MAILFILE "Nominator's Information:\n";
print MAILFILE "Name: $nominators_name\n";
print MAILFILE "Title: $nominators_title\n";
print MAILFILE "Work Phone: $nominators_phone\n";
print MAILFILE "Department: $nominators_department\n";
print MAILFILE "Supervising Manager Approving Nomination: $sup_mgr_app_nomination\n";
print MAILFILE "\n";
print MAILFILE "Description of Accomplishment:\n";
print MAILFILE "Customer Service: $customer_service\n";
print MAILFILE "Revenue Generation/Process Improvement and/or Cost Savings: $rev_generation\n";
print MAILFILE "Going Above and Beyond: $above_beyond\n";
close MAILFILE;

# print (&quot;mail -s \&quot;Global Excellence Nomination For $nominee_name\&quot; $recipient_email < $mail_file&quot;);
system (&quot;mail -s \&quot;Global Excellence Nomination For $nominee_name\&quot; $recipient_email < $mail_file&quot;);
system (&quot;rm -fr $mail_file&quot;);

exit;




I'm a beginner with UNIX and CGI and need help!

Thanks,
Juan
 
Are you getting an error? Perfection in engineering does not happen when there is nothing more to add. Rather it happens when there is nothing more to take away.
 
I get the following errors from mail.log file:

Jun 11 03:00:02 gmcc sendmail[715]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 03:15:01 gmcc sendmail[744]: NOQUEUE: SYSERR(root): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 03:15:02 gmcc sendmail[761]: NOQUEUE: SYSERR(root): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 03:15:02 gmcc sendmail[762]: NOQUEUE: SYSERR(root): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 04:00:01 gmcc sendmail[772]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 05:00:02 gmcc sendmail[794]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 06:00:01 gmcc sendmail[816]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 07:00:01 gmcc sendmail[838]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 08:00:01 gmcc sendmail[860]: NOQUEUE: SYSERR(ac7902): /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
Jun 11 08:25:53 gmcc sendmail[885]: NOQUEUE: SYSERR( /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory
 
Jun 11 08:25:53 gmcc sendmail[885]: NOQUEUE: SYSERR( /ect/mail/sendmail.cf: line 0: cannot open: No such file or directory

You have the wrong Directory.. Look it says /ect instead of /etc

It looks like something is actually setup wrong with sendmail. you might want to take a look at your config file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top