Root's .forward causes delivery to daemon - SCO

This is a discussion on Root's .forward causes delivery to daemon - SCO ; Still a newbee with spamassassin and procmail. I have installed spamassassin on customer's SCO 5.0.7 system and set up one user's .procmailrc and .forward for shaking out the installation. That user is working ok. The customer's root mail box has ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Root's .forward causes delivery to daemon

  1. Root's .forward causes delivery to daemon

    Still a newbee with spamassassin and procmail.

    I have installed spamassassin on customer's SCO 5.0.7 system
    and set up one user's .procmailrc and .forward for shaking
    out the installation. That user is working ok.

    The customer's root mail box has been filling with
    spam messages for several months and so I setup
    /.procmailrc and /.forward for root as well.

    Problem: with "| /usr/bin/procmail" in .forward,
    sendmail delivers root's e-mail to /usr/spool/mail/daemon.

    Searching with Google on "root .forward" brings up
    links where this result is caused by the pipe in .forward.

    But I have not found a way to configure procmail and
    root's .forward to have spamassassin scan root's incoming
    mail and deliver it to /usr/spool/mail/root.

    I have thought of adding "daemon root" to /usr/lib/mail/aliases
    but am concerned that that will create a race or loop.

    any guidance on how to get root's mail scanned with
    spamassassin?
    --

    Steve Fabac
    S.M. Fabac & Associates
    816/765-1670

  2. Re: Root's .forward causes delivery to daemon

    On Fri, 8 Sep 2006, Steve M. Fabac, Jr. wrote:
    > Problem: with "| /usr/bin/procmail" in .forward,
    > sendmail delivers root's e-mail to /usr/spool/mail/daemon.


    I do not know if this will help but it is how root is setup on my
    OpenServer 5.0.7 machine. My system has for root

    --------------------------------Cut-Here---------------------------------
    #
    # Vars
    #
    MAILDIR=/root/Mail
    DEFAULT=$MAILDIR/Unsorted
    LOGFILE=$MAILDIR/Logs/procmail.log
    LOCKSLEEP=0
    SUSPEND=0
    COMSAT=no
    COMMITS=$MAILDIR/Commits
    SHELL=/bin/sh
    VERBOSE=off

    # Note I redirect everything through my mail-check below less than
    # certain make limit I set for spamassasin other wise large files
    # kill spamassassin
    #
    :0fw
    * < 256000
    | /Mail/mail-check

    #:0:
    #* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    #$HOME/spam
    :0:
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*
    /dev/null

    # All mail tagged as spam (eg. with a score higher than the set threshold
    # but less than max threshold is moved to "probably-spam".
    :0:
    * ^X-Spam-Status: Yes
    $HOME/Mail/probably-spam

    # Major cut of rules.

    # Send all other mail to Incoming Mail Box
    :0
    *
    /usr/spool/mail/root

    --------------------------------Cut-Here---------------------------------

    and I use this for /Mail/mail-check

    --------------------------------Cut-Here---------------------------------
    #!/bin/sh
    #
    # Script to pipe an email through spamassassin and generate output
    # which is marked up if it's spam, not marked if it isn't, and an exit
    # code to match.

    # set the standard exit values
    # : ${OK=0} ${FAIL=1} ${STOP=10}

    # set the environment variables
    #


    PATH=$PATH:$HOME/bin:.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/local/ubin:
    export PATH

    LD_LIBRARY_PATH=\;/usr/lib:/lib:/usr/local/lib:/usr/local/mysql/lib/mysql:/usr/local/bdb/lib:/usr/local/ssl/lib:
    LIBPATH=/usr/lib:/lib:/usr/local/lib:
    export LD_LIBRARY_PATH LIBPATH

    MAIL=/usr/spool/mail/root # mailbox location
    export MAIL

    Tempfile=/tmp/`id -un`.$$.tmp
    Tempfile2=$Tempfile.2
    Tempfile1=/tmp/$LOGNAME.$$.tmp1
    TEMPFILE=/tmp/`id -un`.$$.tmp

    cat > $TEMPFILE.unmarked ### < this script's stdin
    /usr/bin/spamassassin < $TEMPFILE.unmarked > $TEMPFILE.marked

    if grep -q '^X-Spam-Flag: YES$' $TEMPFILE.marked; then
    cat $TEMPFILE.marked
    rm -f $TEMPFILE.*
    # exit 1
    else
    cat $TEMPFILE.unmarked
    rm -f $TEMPFILE.*
    # exit 0
    fi

    --------------------------------Cut-Here---------------------------------


    --
    Boyd Gerber
    ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

+ Reply to Thread