I saw this same question posted in the archives but no answer was given. I am having this problem now and can't find a solution. First a little background:
I am running sendmail 8.11.0 on HP-UX 10.20 with procmail as the local delivery agent. Perl version is 5.6.1 My .procmailrc file reads as follows:
VERBOSE=yes
LOGFILE=$HOME/procmail.log
:0 c
backup-mailbox
ANOMY=/usr/local/anomy
:0 fw
|$ANOMY/bin/sanitizer.pl
When an email comes in it is delivered to the correct mailbox but the F in the From: line is missing and a mail client will not read the email. The error logged in the procmail.log file is as follows:
procmail: Assigning "LASTFOLDER=backup-mailbox"
procmail: Opening "backup-mailbox"
procmail: Acquiring kernel-lock
procmail: Assigning "ANOMY=/usr/local/anomy"
procmail: Executing "/usr/local/anomy/bin/sanitizer.pl"
/usr/local/anomy/bin/sanitizer.pl[3]: my: not found.
/usr/local/anomy/bin/sanitizer.pl[4]: my: not found.
/usr/local/anomy/bin/sanitizer.pl[43]: BEGIN: not found.
/usr/local/anomy/bin/sanitizer.pl[44]: use: not found.
/usr/local/anomy/bin/sanitizer.pl[45]: use: not found.
/usr/local/anomy/bin/sanitizer.pl[46]: use: not found.
/usr/local/anomy/bin/sanitizer.pl[49]: my: not found.
/usr/local/anomy/bin/sanitizer.pl[50]: Syntax error at line 50 : `(' is not expected.
procmail: Program failure (127) of "/usr/local/anomy/bin/sanitizer.pl"
procmail: Rescue of unfiltered data succeeded
procmail: Locking "/var/mail/username.lock"
procmail: Assigning "LASTFOLDER=/var/mail/username"
procmail: Opening "/var/mail/sims"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/username.lock"
procmail: Notified comsat: "username@4115:/var/mail/username"
Subject: testing
Folder: /var/mail/username
I replaced the username with the word username in the posting above. If I run the command line
/usr/local/anomy/bin/sanitizer.pl < backup-mailbox
it works perfectly and even creates the quarantined file if the attachment meets the criteria.
I have no idea what is causing this error and would appreciate any help you can lend. Thanks in advance for all your help.
Jeff