procmail
[Top] [All Lists]

truncating body

1997-07-11 16:58:00
I want to truncate bodies to some given length, I try this with

    :0 fhw
    | formail -A "X-Axel: Too big to download"
    :0 fbw
    | (echo "[... truncated ...]"&&head -50&&echo "[... truncated ...]")
    :0:
    $DOWNLOAD

But it doesn't always work. I sometimes get

procmail: Error while writing to " (echo "[... truncated ...]"&&head -50&&echo 
"[... truncated ...]")"
procmail: Rescue of unfiltered data succeeded

in my logfile. This happens to ca 10% of the mails to be truncated that try to
be filtered this way. (I cannot figure a pattern here.) I also tried ; instead
of && w/o change.

(BTW the rationale behind this is that I'd like to read some mail at home and
modem bandwidth forbids downloading big announcements, Postscript files
attached and the like. But I would still like to look at some part of these
longish mails.)

Thanks,
        Axel Thimm.
-- 
Axel Thimm   thimm(_at_)physik(_dot_)fu-berlin(_dot_)de thimm(_at_)ifh(_dot_)de

<Prev in Thread] Current Thread [Next in Thread>