Web Hosting Talk







View Full Version : Error: perl not available for sendmail programs


jaschwa
11-17-2001, 08:41 AM
I'm using a Cobalt RaQ2. The Cobalt forum wasn't able to help me; let's see if anyone here can help.

A client of mine purchased a package called OptIn Lightning (http://optinlightning.com/) to manage his subscriber mailing list. (We asked their support the same question, but they only repeated their recommendation for a certain host.)

When an email is received for the 'subscribe' mailbox, it needs to be passed to a Perl script called post.cgi which extracts the subscriber's email address and adds it to a database. The program offers the option of using a .forward file or a .procmailrc file to enable this to work.

I've determined that setting up the .procmailrc file according to their instructions does nothing, so I'm concentrating on the .forward file.

The .forward file contains the following line:

\gameabyss4,"|/usr/bin/perl /home/sites/www.freecasinobook.com/web/optin/post.cgi"

When I send an email, I get this error bounced back:
sh: perl not available for sendmail programs.

The Cobalt RaQ2 uses a vacation.pl script for auto-replies, so in some cases, Perl is available to sendmail programs. There must be some kind of configuration file that permits only certain scripts to be run from sendmail.

Anybody know which one?

Thank-you.

ffeingol
11-17-2001, 09:54 AM
Check out this in the Sendmail FAQ http://www.sendmail.org/faq/section3.html#3.11.

It's prob. either the shell is not listed in /etc/shells or or you'll need to setup perl in smrsh.

Frank

taz0
11-17-2001, 11:37 AM
Originally posted by jaschwa
I'm using a Cobalt RaQ2. The Cobalt forum wasn't able to help me; let's see if anyone here can help.

A client of mine purchased a package called OptIn Lightning (http://optinlightning.com/) to manage his subscriber mailing list. (We asked their support the same question, but they only repeated their recommendation for a certain host.)

When an email is received for the 'subscribe' mailbox, it needs to be passed to a Perl script called post.cgi which extracts the subscriber's email address and adds it to a database. The program offers the option of using a .forward file or a .procmailrc file to enable this to work.

I've determined that setting up the .procmailrc file according to their instructions does nothing, so I'm concentrating on the .forward file.

The .forward file contains the following line:

\gameabyss4,"|/usr/bin/perl /home/sites/www.freecasinobook.com/web/optin/post.cgi"

When I send an email, I get this error bounced back:
sh: perl not available for sendmail programs.

The Cobalt RaQ2 uses a vacation.pl script for auto-replies, so in some cases, Perl is available to sendmail programs. There must be some kind of configuration file that permits only certain scripts to be run from sendmail.

Anybody know which one?

Thank-you.



You can try this:
chmod u+x post.cgi
check if #!/usr/bin/perl on the first line of post.cgi
and put this in your .forward file
\gameabyss4,"|/home/sites/www.freecasinobook.com/web/optin/post.cgi"

jaschwa
11-17-2001, 02:18 PM
Originally posted by taz0




You can try this:
chmod u+x post.cgi
check if #!/usr/bin/perl on the first line of post.cgi
and put this in your .forward file
\gameabyss4,"|/home/sites/www.freecasinobook.com/web/optin/post.cgi"



post.cgi was already chmod'd to 755

Any other ideas?

ffeingol
11-17-2001, 03:56 PM
Jeff,

Did you see my comment above?

Frank

jaschwa
11-18-2001, 01:39 PM
Originally posted by ffeingol
Jeff,

Did you see my comment above?

Frank

Thank-you - I must have missed that. What really helped me was the tip at http://www.sendmail.org/faq/section3.html#3.34.

Basically, sendmail uses smrsh to run Perl scripts. For smrsh to run a perl script, it has to be in /usr/adm/sm.bin/. Once I created a symbolic link back to the script to be run, it began working.

2Grumpy
11-25-2001, 02:41 PM
Here:
ls -l /usr/adm/sm.bin

shows

lrwxrwxrwx 1 root root 43 Nov 24 21:53 maxemail.cgi -> /home/sites/site20/web/cgi-bin/maxemail.cgi

then a .forward file was created:

cat .forward

\seatec,"|/usr/adm/sm.bin/maxemail.cgi"

No problem! the maxemail.cgi has the #!/usr/bin/perl on the first line of course.