procmail
[Top] [All Lists]

Re: Executing ... No such file or directory

2003-09-05 08:51:07
Ruud asked,

> Is there a way to make this 'append' run gzip without a shell?

Don't ask us.  It was your idea.

If the kernel honors #! scripts and your safeexec setup allows #! scripts called from procmail to run a shell, a #! script might do it:

#!/bin/sh
eval $2 >> "$1"

Otherwise, it will have to be an executable compiled binary.

> I will also dig in the source of procmail to see how it operates when
> SHELLMETAS is empty.

When you had SHELLMETAS unset, procmail had no reason to hand the
command line over to a shell, so it tried to interpret

 gzip -9c >> filename.gz

on its own.  Procmail took ">>" as a command-line parameter, and in turn
gzip took it as a filename.  In other words, gzip tried, at compression
level 9, to compress files named ./>> and ./filename.gz (though if gzip
got that far, it might have balked at trying to compress a file with
that extension on its name), and to write the result to stdout per the
-c option.  But there was no file named ./>>, so gzip complained that
there was no such file.


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