Hello
Some time ago I got here an advice how to list all mail attachments. It was
from Gary Funck and he advised me to use this :
:0
* ^Content-Type:[ ]*multipart/mixed
{
TMPDIR=`mktemp -d munpack-XXXXXX`
TRAP="rm -rf $TMPDIR; $TRAP"
:0
ATTACH_INFO=|munpack -C $TMPDIR -q
#Now, do something with $ATTACH_INFO
}
As I am using AIX 4.3.2, so I have no mktemp command and also had to compile
munpack by myself. That's what I did in /etc/procmailrc (no drop of
privileges are configured, procmail is suid root) :
MUNPACK=/usr/local/procmail/bin/munpack
TMPDIR=/tmp/procmail.$$
:0 Wic
| mkdir -p $TMPDIR
FLIST = `$MUNPACK -q -t -C $TMPDIR 2>/dev/null`
Now sometimes (not every time!) I am getting this message :
procmail: Assigning "MUNPACK=/usr/local/procmail/bin/munpack"
procmail: Assigning "TMPDIR=/tmp/procmail.36688"
procmail: Executing "mkdir,-p,/tmp/procmail.36688"
procmail: [36688] Thu Mar 18 09:16:41 2004
procmail: Assigning "LASTFOLDER=mkdir -p /tmp/procmail.36688"
procmail: Executing "cd $TMPDIR; $MUNPACK -q -t -C $TMPDIR 2>/dev/null"
shell-init: could not get current directory: getcwd: cannot access parent
directories: Permission denied
cd_links: could not get current directory: getcwd: cannot access parent
directories: Permission denied
/usr/local/bin/bash: cd: /tmp/procmail.36688: Permission denied
job-working-directory: could not get current directory: getcwd: cannot
access parent directories: Permission denied
procmail: Assigning "FLIST="
Why this error occurs sometimes ?
Thanks everyone for tips and advises.
With best regards
Martynas
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail