Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > PostFix and the SuperUser

PostFix and the SuperUser
Thread Tools
nemanirc
Dedicated MacNNer
Join Date: Mar 2000
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jun 10, 2004, 11:25 PM
 
I have a Javascript on my website that is supposed to send e-mail through my mail client (postfix) to the recipients named on the page. This worked properly with Sendmail, but when I try to do so with PostFix, I get the following two errors in my log:

postfix[2712]: error: to submit mail, use the Postfix sendmail command
postfix[2712]: fatal: the postfix command is reserved for the superuser

I activated PostFix using the great PostFix Enabler 1.09 program (www.cutedgesystems.com) and can send mail from the command line, but cannot get the javascript to do so. Help???
R. C. Nemanick, Ph.D.
PBG4 12" 867MHz 640 MB RAM
PMG3 500MHz 1 GB RAM
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jun 10, 2004, 11:51 PM
 
Originally posted by nemanirc:
I have a Javascript on my website that is supposed to send e-mail through my mail client (postfix) to the recipients named on the page. This worked properly with Sendmail, but when I try to do so with PostFix, I get the following two errors in my log:

postfix[2712]: error: to submit mail, use the Postfix sendmail command
postfix[2712]: fatal: the postfix command is reserved for the superuser

I activated PostFix using the great PostFix Enabler 1.09 program (www.cutedgesystems.com) and can send mail from the command line, but cannot get the javascript to do so. Help???
JavaScript cannot interface with postfix or sendmail within a web browser. The security settings on a browser don't allow that, and there are no functions to talk to it in any case. Can you post a URL so we can see what you're trying to do?
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
nemanirc  (op)
Dedicated MacNNer
Join Date: Mar 2000
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jun 11, 2004, 07:09 AM
 
Originally posted by Arkham_c:
JavaScript cannot interface with postfix or sendmail within a web browser. The security settings on a browser don't allow that, and there are no functions to talk to it in any case. Can you post a URL so we can see what you're trying to do?
Here is the web page:

http://www.nemanick.com/survey.html

Here is the script it calls:

http://www.nemanick.com/cgi-bin/survey.pl
R. C. Nemanick, Ph.D.
PBG4 12" 867MHz 640 MB RAM
PMG3 500MHz 1 GB RAM
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jun 11, 2004, 09:40 AM
 
Originally posted by nemanirc:
Here is the web page:

http://www.nemanick.com/survey.html

Here is the script it calls:

http://www.nemanick.com/cgi-bin/survey.pl
Ok, that's a Perl script, not a JavaScript.

If you are having a problem with the script, and want assistance, you'll have to post the part of the script that is interfacing with sendmail/postfix. Since the script is perl, and the error suggests using the sendmail command, it wants you to use the command-line program /usr/sbin/sendmail to send the email messages. Post the relevant part of that Perl script here in code blocks and we'll try to help you debug it.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
nemanirc  (op)
Dedicated MacNNer
Join Date: Mar 2000
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jun 11, 2004, 09:50 AM
 
Originally posted by Arkham_c:
Ok, that's a Perl script, not a JavaScript.

If you are having a problem with the script, and want assistance, you'll have to post the part of the script that is interfacing with sendmail/postfix. Since the script is perl, and the error suggests using the sendmail command, it wants you to use the command-line program /usr/sbin/sendmail to send the email messages. Post the relevant part of that Perl script here in code blocks and we'll try to help you debug it.
Here is the reference to Postfix:
Code:
$mailprog ="/usr/sbin/postfix";
Here is where it decides to send the e-mail:
Code:
#send supervisor emails $relationship = "Supervisor"; for ($i=$superstart; $i <= $superend; $i++) { my $parmname = @parms[$i]; $to = $form->param($parmname); &create_email; }
Here is where it tries to generate the e-mail:
Code:
sub create_email { if ($to gt "") { open(MAIL, "| $mailprog -t ") or die "Can not run sendmail $!\n"; print MAIL "To: $to\n"; print MAIL "FROM: $from\n"; print MAIL "Subject: $subject\n"; print MAIL "MIME-Version: 1.0\n"; print MAIL "Content-type: multipart/alternative; boundary=\"$boundary\"\n\n"; ###plain text version print MAIL "--$boundary\n"; print MAIL "Content-Type: text/plain\n"; print MAIL "Content-Transfer-Encoding: 8bit\n\n"; print MAIL "The person named below is participating in the company\'s 360 Degree Feedback survey. She or he has asked you to participate by providing input on your observations of her or his behavior in a leadership role. Your observations will be a vital part of this person's developmental feedback.\n\n"; print MAIL "The link to the on-line survey is below. Please complete this survey before $expdate. The code below is used to connect your feedback to this person's results. Also below is the relationship you have with this person (supervisor, team member, peer); you will be asked to enter both in the on-line survey.\n\n"; print MAIL "NAME: $partname\n\n"; print MAIL "RELATIONSHIP: $relationship\n\n"; print MAIL "CODE: $code\n\n"; print MAIL "Survey Link: http://www.nemanick.com/PGRD_360.html\n\n"; print MAIL "This survey is intended for this person's development only and will not be used in connection with employee evaluation. No one outside Nemanick Consulting Group will see your individual responses.\n\n"; print MAIL "If you have any questions about the survey, please feel free to contact Rik Nemanick at ###.###.#### or nemanick\@mac.com.\n\n"; print MAIL "Rik Nemanick, Ph.D.\nPrincipal\nNemanick Consulting Group\n"; print MAIL "\n"; ###html version print MAIL "--$boundary\n"; print MAIL "Content-type: text/html\n"; print MAIL "Content-Transfer-Encoding: 8-bit\n\n"; print MAIL "<html><head></head><body style=\"font-family: Arial,Helvetica\">"; print MAIL "<p>The person named below is participating in the company\'s 360 Degree Feedback survey. She or he has asked you to participate by providing input on your observations of her or his behavior in a leadership role. Your observations will be a vital part of this person's developmental feedback.</p>\n"; print MAIL "<p>The link to the on-line survey is below. Please complete this survey before $expdate. The code below is used to connect your feedback to this person's results. Also below is the relationship you have with this person (supervisor, team member, peer); you will be asked to enter both in the on-line survey.</p>\n"; print MAIL "<p><b>Name:</b> $partname</p>"; print MAIL "<p><b>Relationship:</b> $relationship</p>"; print MAIL "<p><b>Code:</b> $code</p>"; print MAIL "<p><b>Survey Link:</b> <a href=\"http://www.nemanick.com/PGRD_360.html\">http://www.nemanick.com/PGRD_360.html</a></p>\n"; print MAIL "<p style=\"color: blue\"><b>This survey is intended for this person's development only and will not be used in connection with employee evaluation.</b><i> No one outside Nemanick Consulting Group will see your individual responses.</i></p>\n"; print MAIL "<p>If you have any questions about the survey, please feel free to contact Rik Nemanick at ###.###.#### or <a href=\"mailto:nemanick\@mac.com\">nemanick\@mac.com.</a></p>\n"; print MAIL "<p>Rik Nemanick, Ph.D.<br>Principal<br>Nemanick Consulting Group</p>"; print MAIL "</body>\n</html>\n\n"; print MAIL "--$boundary--\n\n"; close (MAIL); }
The person who wrote the script wrote it for Sendmail and does not know much about postfix.
( Last edited by nemanirc; Jun 11, 2004 at 10:52 AM. )
R. C. Nemanick, Ph.D.
PBG4 12" 867MHz 640 MB RAM
PMG3 500MHz 1 GB RAM
     
rkt
Mac Enthusiast
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jun 11, 2004, 07:06 PM
 
Originally posted by nemanirc:
Here is the reference to Postfix:
Code:
$mailprog ="/usr/sbin/postfix";
that should read:
$mailprog ="/usr/sbin/sendmail";

/usr/sbin/postfix is for controlling postfix, /usr/bin/sendmail (which, with postfix, is a sendmail compatible front-end) is for injecting mail into the queue.
     
nemanirc  (op)
Dedicated MacNNer
Join Date: Mar 2000
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jun 12, 2004, 04:25 PM
 
Originally posted by rkt:
that should read:
$mailprog ="/usr/sbin/sendmail";

/usr/sbin/postfix is for controlling postfix, /usr/bin/sendmail (which, with postfix, is a sendmail compatible front-end) is for injecting mail into the queue.
Okay, that worked great. Now, however, I am trying to use the program to send mail and am getting all of the e-mail rejected. The messages come back with this error in the heading:

[email protected]>: host sbcmail6.prodigy.net[64.164.98.64] said: 553
5.3.0 <[email protected]>... Relaying is NOT allowed here (in reply
to RCPT TO command)

--15E2042EDA.1087055482/nemanick.com
Content-Description: Delivery error report
Content-Type: message/delivery-status

Reporting-MTA: dns; nemanick.com
Arrival-Date: Sat, 12 Jun 2004 10:51:20 -0500 (CDT)

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host sbcmail6.prodigy.net[64.164.98.64] said: 553
5.3.0 <[email protected]>... Relaying is NOT allowed here (in reply
to RCPT TO command)

I am sure I am not setting something properly in the main.cf file for Postfix, but I am not sure what. I have specified myhostname = mail.nemanick.com , mydomain = nemanick.com, and myorigin = $mydomain. Is there something else I am supposed to do?
R. C. Nemanick, Ph.D.
PBG4 12" 867MHz 640 MB RAM
PMG3 500MHz 1 GB RAM
     
nemanirc  (op)
Dedicated MacNNer
Join Date: Mar 2000
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jun 12, 2004, 04:54 PM
 
Never mind. I fixed it.
R. C. Nemanick, Ph.D.
PBG4 12" 867MHz 640 MB RAM
PMG3 500MHz 1 GB RAM
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:44 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,