anomy-list

Re: disable anomy

From: rushi de silva (130281@xyz.molar.is)
Date: Mon 28 Jun 2004 - 19:13:38 GMT

  • Next message: rushi de silva: "Re: disable anomy"

    On Monday, June 28, 2004, at 11:24 AM, Alexander Gretencord wrote:

    > On Monday 28 June 2004 19:59, rushi de silva wrote:
    >> how do i disable anomy filtering.
    >
    > Edit filter.sh to not call anomy (you probably have some pipe
    > construction
    > there, piping everything through anomy, through sa and then back out to
    > postfix, just remove the call to anomy)

    if i delete everything and leave the exit command will this work?
    i am not sure what i should delete here at all.

    #!/bin/sh
    #
    # filter.sh
    #
    # Simple filter to plug Anomy Sanitizer and SpamAssassin
    # into the Postfix MTA
    #
    # From http://advosys.ca/papers/postfix-filtering.html
    # Advosys Consulting Inc., Ottawa
    #
    # For use with:
    # Postfix 20010228 or later
    # Anomy Sanitizer revision 1.49 or later
    # SpamAssassin 2.42 or later
    #
    # Note: Modify the file locations to match your particular
    # server and installation of SpamAssassin.

    # File locations:
    # (CHANGE AS REQUIRED TO MATCH YOUR SERVER)
    INSPECT_DIR=/var/spool/filter
    SENDMAIL="/usr/sbin/sendmail -i"
    ANOMY=/usr/local/anomy
    ANOMY_CONF=/usr/local/anomy/anomy.conf
    ANOMY_LOG=/dev/null
    SANITIZER=/usr/local/anomy/bin/sanitizer.pl
    SPAMASSASSIN=/usr/bin/spamassassin

    export ANOMY

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

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

    # Clean up when done or when aborting.
    trap "rm -f out.$$" 0 1 2 3 15

    cat | $SPAMASSASSIN -x | $SANITIZER \
        $ANOMY_CONF 2>>$ANOMY_LOG > out.$$ || \
        { echo Message content rejected; exit $EX_UNAVAILABLE; }

    $SENDMAIL "$@" < out.$$

    exit $?

    > or remove the '-o contentfilter=filter' you should have in the line
    > for the smtp protocol in
    > master.cf.

    below is my master.cf file, i don't see any line in regards to filter.
    the last two lines are what where added.

    smtp inet n - n - - smtpd
    #smtps inet n - n - - smtpd
    # -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission inet n - n - - smtpd
    # -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628 inet n - n - - qmqpd
    pickup fifo n - n - 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n - 1 qmgr
    #qmgr fifo n - n - 1 nqmgr
    #tlsmgr fifo - - n - 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    flush unix n - n - 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - n - - smtp
    relay unix - - n - - smtp
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - n - - showq
    error unix - - n - - error
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - n - - lmtp
    #
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    #
    maildrop unix - n n - - pipe
       flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    #
    # The Cyrus deliver program has changed incompatibly, multiple times.
    #
    old-cyrus unix - n n - - pipe
       flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    # Cyrus 2.1.5 (Amos Gouaux)
    cyrus unix - n n - 10 pipe
       user=cyrus argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m
    ${extension} ${user}
    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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
    $recipient
    filter unix - n n - - pipe
       flags=Rq user=filter argv=/usr/local/anomy/filter.sh -f ${sender} --
    ${recipient}



    hosted by molar.is