procmail
[Top] [All Lists]

Still having perl problems!

1996-12-05 10:38:54
I'm still having problems getting procmail to pipe my mail to a perl 
script.  It seems as if it insists on running the script under the bourne 
shell (sh) which does not understand the #!/usr/bin/perl at the beginning 
of the script.  I have included below hopefully EVERYTHING that would be 
of use in determining what the hell is going wrong and how to get things 
working...

BTW, the script does work as expected if I run it from the command line 
(under tcsh).  Example:  cat testfile | filter.pl

PERMISSIONS:
============

Perl Binary:
lrwxrwxrwx   1 root     other          5 May 13  1996 /usr/bin/perl -> perl5*
lrwxrwxrwx   1 root     other          9 May 13  1996 /usr/bin/perl5 -> 
perl5.002*
-rwxr-xr-x   1 root     200       542248 May  2  1996 /usr/bin/perl5.002*

Path to (and including) perl script:
drwxr-xr-x 731 root     other      28672 Nov  6 13:09 homee/
drwxr-xr-x  13 downin   ipusers     4096 Dec  5 12:06 downin/
drwxr-xr-x   2 downin   ipusers     4096 Dec  4 10:23 nags/
-rwxr-xr-x   1 downin   ipusers    25172 Dec  3 16:37 filter.pl*

Procmail stuff:
-rwsr-sr-x   1 root     mail       65060 Nov  7  1994 /usr/local/bin/procmail*
-rw-r--r--   1 downin   ipusers      391 Dec  4 10:27 .procmailrc

PROCMAILRC:
===========

VERBOSE=yes
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/opt/local/bin:/usr/local/bin:/homee/downin/nags:.
MAILDIR=$HOME/Mail
DEFAULT=/var/mail/downin
LOGFILE=$MAILDIR/log

:0: nags_filter.lock
* ^From:(_dot_)*downin(_at_)reboot(_dot_)dt(_dot_)navy(_dot_)mil
|/homee/downin/nags/filter.pl

FILTER.PL (just the first few lines):
=====================================
#!/usr/bin/perl
$version="2.5";
$your_name="Dave Downin";
$your_email='downin(_at_)clark(_dot_)net';
$home_dir='/homee/downin';
$mailbox='/var/mail/downin';
@smtp_hosts=("mail.clark.net");

PROCMAIL LOG:
=============
procmail: Match on 
"^From:(_dot_)*downin(_at_)reboot(_dot_)dt(_dot_)navy(_dot_)mil"
procmail: Locking "nags_filter.lock"
procmail: Executing "/homee/downin/nags/filter.pl"
/homee/downin/nags/filter.pl: =2.5: not found
/homee/downin/nags/filter.pl: =Dave Downin: not found
/homee/downin/nags/filter.pl: =downin(_at_)clark(_dot_)net: not found
/homee/downin/nags/filter.pl: =/homee/downin: not found
/homee/downin/nags/filter.pl: =/var/mail/downin: not found
/homee/downin/nags/filter.pl: syntax error at line 86: `(_at_)smtp_hosts=' 
unexpected
procmail: Program failure (2) of "/homee/downin/nags/filter.pl"
procmail: Assigning "LASTFOLDER=/homee/downin/nags/filter.pl"
procmail: Unlocking "nags_filter.lock"
procmail: Locking "/var/mail/downin.lock"
procmail: Assigning "LASTFOLDER=/var/mail/downin"
procmail: Opening "/var/mail/downin"
procmail: Acquiring kernel-lock
procmail: [7431] Thu Dec  5 12:20:11 1996
procmail: Unlocking "/var/mail/downin.lock"
From downin(_at_)reboot(_dot_)dt(_dot_)navy(_dot_)mil  Thu Dec  5 12:20:10 1996
 Subject: THIS IS A SPAM MAIL TEST
  Folder: /var/mail/downin                                                  998
procmail: Notified comsat: "downin(_at_)41836:/var/mail/downin"

-- 
Dave Downin (downin(_at_)clark(_dot_)net / 
downin(_at_)reboot(_dot_)dt(_dot_)navy(_dot_)mil / arlo(_at_)hackerz(_dot_)org)
=============================================================================
        "Sorry, the world is nuts.  It can't be helped" - Arlo Guthrie
        ArloNet - http://www.clark.net/pub/downin/cgi-bin/arlonet.html 
=============================================================================

<Prev in Thread] Current Thread [Next in Thread>