anomy-list

Re: RE: Feature request - adding Virus-Header tag ?

From: Paolo (136392@xyz.molar.is)
Date: Fri 14 Jan 2005 - 00:04:43 GMT

  • Next message: Luis Miguel R.: "Re: Feature request - adding Virus-Header tag ?"

    On Thu, Jan 13, 2005 at 11:12:48PM +0100, Joerg Mertin wrote:
    >
    > I'm using a script anomy-filter.sh - that basically handles sanitizer.pl
    > and pipes it then to formail:
    >
    >
    > cat /dev/null > /var/spool/anomy/virus_scan.tmp
    >
    > cat | $SPAMC -f -u filter 2>/dev/null \
    > | $ANOMY/bin/sanitizer.pl $ANOMY_CONF 2>>$ANOMY_LOG \
    > | /usr/bin/formail -a "X-Antivirus:`/bin/cat \
    > /var/spool/anomy/virus_scan.tmp`" - \
    > | $SENDMAIL "$@" || \
    > { echo Message content rejected; exit $EX_UNAVAILABLE; }
    >
    > The virus is found by sending the mail - but the X-Antivirus: header stays
    > blank ...

    you need to do it in 2 steps, save the output from sanitizer in a safe
    tempfile, then feed it to formail; if you have tempfs mounted, you can
    spool both virus_scan.tmp and eg `tempfile -m 600 -d /dev/shm -p msg-`
    into /dev/shm, if you have enough RAM. That would be pretty fast.



    hosted by molar.is