procmail forwarder: How to make a notice?
am 22.12.2005 09:27:11 von truman321
Hi everybody,
i just want to set a notice in the forwarded mail like this:
{
:0 fhw
| (cat - ; echo "KOPIE eingehende Mail 3. Stock" ; echo)
:0
! kopie3
}
The mail should be forwarded to kopie3 with the notice "KOPIE
eingehende Mail...."
But it does not work properly, it will be forwarded but sometimes (in
most cases the note is in the mail) the note is missing. Can somebody
help me?
thx, truman321
Re: procmail forwarder: How to make a notice?
am 22.12.2005 13:26:50 von AK
truman321 wrote:
> Hi everybody,
>
> i just want to set a notice in the forwarded mail like this:
>
> {
> :0 fhw
> | (cat - ; echo "KOPIE eingehende Mail 3. Stock" ; echo)
> :0
> ! kopie3
> }
>
> The mail should be forwarded to kopie3 with the notice "KOPIE
> eingehende Mail...."
> But it does not work properly, it will be forwarded but sometimes (in
> most cases the note is in the mail) the note is missing. Can somebody
> help me?
>
> thx, truman321
>
Why are you using the h flag ( this directs the filter to only work on
the header of the message and as such will append your note as part of
the header of the message.
try using formail -X "" and formail -I "" to extract and assign the
Header and body of the message to a variable and then
:0fw
(echo "$HEADER"; \
echo ""; \
echo "KOPIE eingehende Mail 3. Stock" ;\
echo "";\
echo "$BODY" ; )
:0
! kopie3
You should note that if you receive a MIME encoded message, the
modification will break that and might not have the additional line
displayed.
AK