procmail
[Top] [All Lists]

getting procmail to run with my groups

2003-01-21 15:46:05
Hello, I have started working with procmail in the past month, and I'm having a 
problem with permissions, and getting variable assignments to perform as 
advertised.

I have a couple of recipes (names have been changed to protect the innocent)

:0w
* ^TO_update(_at_)mydomain(_dot_)com
* ? formail -rt -xTo: | egrep -iqs 
"(mytest(_at_)anotherdomain(_dot_)com|myclient.com)"
REPORT=| (munpack -C $HOME/myclientmeta ; newgrp purple ; mv --backup=numbered 
$HOME/myclientmeta/* /home/ftproot/myclient/docs ;
 )

:0e
{
  LOG="$NL$REPORT$NL"
}

The idea is if I email a file from mytest(_at_)anotherdomain(_dot_)com or my 
client does the same from whatever(_at_)myclient(_dot_)com and it is sent to 
update(_at_)mydomain(_dot_)com, then this rule should unpack the mime-encoded 
file and put it into my client's web server directory.  If I type in the 
munpack and the mv at the command line, then it works ok.  If procmail tries to 
do it, the log gets

munpack: reading from standard input
mv: cannot backup `/home/ftproot/myclient/docs/OurStaff.jpg': Permission denied
procmail: Program failure (1) of " (munpack -C $HOME/myclientmeta ; newgrp 
purple ; mv --backup=numbered $HOME/myclientmeta/* /home/ftproot/myclient/docs 
; )"

followed by a couple of blank lines because $REPORT *never* gets anything put 
into it >:-(

Here are the ls's of the client's directories
drwxrwxr-x    3 myclient  purple       4096 Apr  4  2000 /home/ftproot/myclient/
drwxrwxr-x   14 myclient  purple       8192 Jan 21 13:24 
/home/ftproot/myclient/docs

If I type groups at the command line, I get
121 purple

But when I put LOG=`groups` into .procmailrc I just get 121, so I thought I 
could force it over with the newgrp purple

Thanks for any help you can provide,

jeff


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • getting procmail to run with my groups, Jeff Orrok <=