[Postfix-es] postfix + clamav + bogofilter

linux en derechoalgrano.com.ar linux en derechoalgrano.com.ar
Mar Jun 28 02:17:56 CEST 2005


hola lista: Disculpen si es medio extenso, pero estoy tratando de
configurar postfix + clamav + bogofilter. Puntualmente el problema lo
tengo cuando intento intento integrar bogofilter. Ya que con el amavis
verifico que funciona.

Mi plataforma:
-debian sarge
-postfix 2.1.5-9
-clamav 0.84-2
-amavis  20030616p10-5
-bogofilter 0.94.4-1

Cuando integro bogofilter e intento enviar un mensaje me sale lo siguiente:

=============================
Jun 27 20:57:34 turx postfix/pipe[10000]: 7B0725FBA7:
to=<alejandro en turx.tc>, relay=filter, delay=12, status=deferred (temporary
failure. Command output: /home/bogofilter/postfix-filter.sh: line 1:
=/usr/bin/bogofilter: No such file or directory
/home/bogofilter/postfix-filter.sh: line 18: -p: command not found )
Jun 27 20:57:35 turx postfix/smtpd[9995]: disconnect from
localhost.localdomain[127.0.0.1]
=============================
El script que elabore lo tome en base del ejemplo que dice en
(/usr/share/doc/bogofilter/integrating-with-postfix)
El directorio /home/bogofilter lo cree a mano y para verificar que no
fuera asunto de permisos tiene :
drwxr-sr-x  2 root   staff   4096 2005-06-27 19:57 bogofilter

el script:
-rwxr-xr-x  1 root staff     746 2005-06-27 19:57 postfix-filter.sh
==============================================
turx:/home/bogofilter# cat postfix-filter.sh
=/usr/bin/bogofilter
        FILTER_DIR=/var/spool/filter
        POSTFIX=/usr/sbin/sendmail
        export BOGOFILTER_DIR=/home/bogofilter

        # Exit codes from <sysexits.h>
        EX_TEMPFAIL=75
        EX_UNAVAILABLE=69

        cd $FILTER_DIR || \
            { echo $FILTER_DIR does not exist; exit $EX_TEMPFAIL; }

        # Clean up when done or when aborting.
        trap "rm -f msg.$$ ; exit $EX_TEMPFAIL" 0 1 2 3 15

        # bogofilter -e returns: 0 for OK, nonzero for error
        rm -f msg.$$ || exit $EX_TEMPFAIL
        $FILTER -p -u -e > msg.$$ || exit $EX_TEMPFAIL

        exec <msg.$$ || exit $EX_TEMPFAIL
        rm -f msg.$$ # safe, we hold the file descriptor
        exec $POSTFIX "$@"
        exit $EX_TEMPFAIL

turx:/home/bogofilter#
==============================================
Mi /etc/postfix/master.cf

turx:/usr/share/doc/bogofilter# cat /etc/postfix/master.cf |grep -v \#
smtp      inet  n       -       -       -       -       smtpd
        -o content_filter=filter:
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       -       300     1       qmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender
$recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop}${user} ${extension}



smtp-amavis unix -      -       n     -       2  smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes

127.0.0.1:10025 inet n  -       n     -       -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000

filter    unix  -       n       n       -       -       pipe
        flags=R user=filter argv=/home/bogofilter/postfix-filter.sh -f
${sender} -- ${recipient}

turx:/usr/share/doc/bogofilter#

No me logro dar cuenta que omito o que esta mal .
Muchas GRacias.

Vilte, Alejandro
Longchamps
Argentina.





Más información sobre la lista de distribución Postfix-es