[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Raq3 Procmail and Perl <-no work
- Subject: [cobalt-users] Raq3 Procmail and Perl <-no work
- From: Kul <WebMaster@xxxxxxx>
- Date: Sun Mar 4 10:59:01 2001
- Organization: Qax
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi all,
I am having a big problem with procmail executing a perl script, am I doing something wrong?
I'm by no means new to either perl and procmail (3-4yrs), but this one has got past me now, and im not getting any closer to solving it! Also the procmail and perl script work perfectly on a different box - UNIX.
Anyway, its a Raq3, and the .procmailrc file is in a users dir (qax) (/home/sites/site6/users/qax/.procmailrc) seems to be working fine itself, it does everything non perl related on the other receipes just fine.
But when it comes to the perl script, the script IS found, and then it finds really basic errors (as per my log I include in the .procmailrc file), like it does not recognise the script is a perl script! It doesn't understand simple stuff like 'use' and 'print' etc. It seems to me that procmail here is unable to understand the shebang line or doesn't know what to do with the script. I have run the script both from a browser and direct from the command line (SSH as root) ie 'perl abc.pl' and './abc.pl' and everything works fine there, so I can conclude the script is not bodged.
One of my many sets of errors that are reporting:
procmail: Executing "/home/sites/site6/users/qax/abc.pl"
/ho..bla..qax/abc.pl: use: command not found
/ho..bla..qax/abc.pl: syntax error near unexpected token `;'
/ho..bla..qax/abc.pl: /ho..bla..qax/abc.pl: line 3: `print "hello";'
procmail: Program failure (2) of "/home/sites/site6/users/qax/abc.pl"
procmail: Assigning "LASTFOLDER=/home/sites/site6/users/qax/abc.pl"
The procmailrc file looks like this:
SHELL=/bin/sh
LOGFILE=$HOME/mlog/mail-`date +%y%m%d`.log
COMSAT=no
VERBOSE=yes
LOGABSTRACT=all
........bla bla bla.......
:0c
* ^TO_abc@xxxxxxx
* !^FROM_DAEMON
* !^X-Loop: X-Loop@xxxxxxx
{
:0 :perl.lock
| abc.pl
}
........bla bla bla.......
The simplified perl script looks like this: (in the same dir as .procmailrc file and tried in the main web dir too)
#!/usr/bin/perl
print "hello";
__END__
The procmailrc file has the right permissions, and so does its parent directory
drwx------ 4 qax site6 1024 Mar 4 17:17 qax
--> -rw------- 1 qax site6 836 Mar 4 17:17 .procmailrc
my new simple test perl script has these permissions
-rwxr-xr-x 1 qax site6 32 Mar 4 17:17 abc.pl
BOTH the perl script and .procmailrc have both been ftp'd in ASCII mode etc. (and I have double/triple/quadruple checked this - as its the favorite problem)
Very strange! That perl script is about as simple as it could be, and it wont go....
Ive spent all day saturday and today messing with this (RTFM and Cobalt archives yeild nothing here), and finally have got nowhere fast. Now its time for some advice from you all if you can?
Any help will be greatly appreciated!
--
Regards,
Kul