On 29 Dec 2003, at 08:55, Lee Hoffner wrote:
On Monday 29 December 2003 11:25 am, LuKreme wrote:
On 29 Dec 2003, at 08:15, Lee Hoffner wrote:
Hi, again. My recipe can break if there is an & in the subject line.
Here is a
sample log entry:
TRAP= 'echo '`date`': HTML message from '$SPAMMER' with subject
This shell invocation is not escaped, so the '&' backgrounds the echo.
Can you elaborate, please? I don't understand: does 'echo ' need to be
instead? I tried that earlier and the recipe didn't work at all.
The trap is assigned to, for example (ignoring quoting errors for now):
TRAP='echo Tue Dec 30 12:44:22 MST 2003: HTML message from
loser(_at_)spam(_dot_)com with subject B&W pictures was'
now, when this is passed to the shell, the &, unescaped, becomes a
background and the command fails.
You might try this:
TRAP='echo `date`: message from "$SPAMMER" with subject "$SUB" was
which will give you:
Tue Dec 30 12:54:34 MST 2003: message from kremels(_at_)kreme(_dot_)com with
subject Test #1 was logged
Tue Dec 30 12:57:23 MST 2003: message from kremels(_at_)kreme(_dot_)com with
subject test & test #2 was logged
now, if you want actual "'s in there, you will need to do something
TRAP= 'echo `date`: message from "\"$SPAMMER\"" with subject "\"$SUB\""
Tue Dec 30 13:03:01 MST 2003: message from "kremels(_at_)kreme(_dot_)com" with
subject "test & test #2" was logged
Well I've seen the Heart of Darkness/Read the writing on the wall/and
the voice out in the desert/Was the voice out in the hall
Description: S/MIME cryptographic signature
procmail mailing list