Spamassassin and spam - Mandriva

This is a discussion on Spamassassin and spam - Mandriva ; Hi, I have for many years had a box set up with Mandrake 2005 LE as e-mail server for my local network, little spam getting trough. Now, I have got a new piece of hardware and did a clean install ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 26

Thread: Spamassassin and spam

  1. Spamassassin and spam

    Hi,
    I have for many years had a box set up with Mandrake 2005 LE as e-mail
    server for my local network, little spam getting trough.
    Now, I have got a new piece of hardware and did a clean install of
    Mandriva 2008 and set it up with fetchmail, spamassassin and postfix.
    I told Procmail to throw away spam to dev null and set spamassassin to
    let everything Norwegian trough and set spamlimit to 2 instead of five.
    This was the setup of the old box I had. The strange thing is that I
    still get a lot of spam, this pusles me, does anyone have an idea what
    this can be?
    Everything is configured by Webmin.

    This is my rc.spam file:

    :0:
    * ^X-Spam-Level: XXXXXXXX
    zSpam


    This is my procmail file:

    PROCMAILDIR=$HOME/.procmail
    LOG=$PROCMAILDIR/pmlog
    VERBOSE=yes # turn this on for debugging
    MAILDIR=$HOME/Maildir # this is for pine - yours may differ
    INCLUDERC=$PROCMAILDIR/rc.spam
    # INCLUDERC=$PROCMAILDIR/rc.morefilters
    # If none of the filters match, it will go to your inbox.


    All the best

    Roger
    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  2. Re: Spamassassin and spam (a little more info)

    THIS is my procmailrc file:

    DROPPRIVS=yes
    :0fw
    | /usr/bin/spamassassin
    :0
    * ^X-Spam-Status: Yes
    /dev/null


    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  3. Re: Spamassassin and spam

    Roger <""roger\"@the linuxmachine.invalid"> writes:

    > Hi,
    > I have for many years had a box set up with Mandrake 2005 LE as e-mail
    > server for my local network, little spam getting trough.
    > Now, I have got a new piece of hardware and did a clean install of
    > Mandriva 2008 and set it up with fetchmail, spamassassin and postfix.
    > I told Procmail to throw away spam to dev null and set spamassassin to
    > let everything Norwegian trough and set spamlimit to 2 instead of
    > five. This was the setup of the old box I had. The strange thing is
    > that I still get a lot of spam, this pusles me, does anyone have an
    > idea what this can be?
    > Everything is configured by Webmin.
    >
    > This is my rc.spam file:


    To see why spamassassin lets a mail thru run it with
    -D -t.

    The output will show the checks it made and the scoring.

  4. Re: Spamassassin and spam


    > To see why spamassassin lets a mail thru run it with
    > -D -t.
    >
    > The output will show the checks it made and the scoring.


    Thanks, here's what I've got (after the last line it waits forever):

    [14832] dbg: logger: adding facilities: all
    [14832] dbg: logger: logging level is DBG
    [14832] dbg: generic: SpamAssassin version 3.2.3
    [14832] dbg: config: score set 0 chosen.
    [14832] dbg: util: running in taint mode? no
    [14832] dbg: dns: is Net:NS::Resolver available? yes
    [14832] dbg: dns: Net:NS version: 0.61

    Score 0???

    where do I go from here?

    Roger


    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  5. Re: Spamassassin and spam

    Roger <""roger\"@the linuxmachine.invalid"> writes:

    >> To see why spamassassin lets a mail thru run it with
    >> -D -t.
    >> The output will show the checks it made and the scoring.

    >
    > Thanks, here's what I've got (after the last line it waits forever):
    >
    > [14832] dbg: logger: adding facilities: all
    > [14832] dbg: logger: logging level is DBG
    > [14832] dbg: generic: SpamAssassin version 3.2.3
    > [14832] dbg: config: score set 0 chosen.
    > [14832] dbg: util: running in taint mode? no
    > [14832] dbg: dns: is Net:NS::Resolver available? yes
    > [14832] dbg: dns: Net:NS version: 0.61
    >
    > Score 0???
    >
    > where do I go from here?


    It shouldn't wait forever, sounds like you didn't feed it
    any mail.

    The command line should be:

    spamassassin -D -t < onemailfile

    There "onemailfile" is one mail message.
    Pick a message that you think it should have caught.

    You should see something like this:

    Content analysis details: (100.1 points, 5.0 required)

    pts rule name description
    ---- ---------------------- --------------------------------------------------
    100 USER_IN_BLACKLIST From: address is in the user's black-list
    0.7 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date
    0.1 EXCUSE_1 BODY: Gives a lame excuse about why spam was sent
    0.1 HTML_80_90 BODY: Message is 80% to 90% HTML
    -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1%
    [score: 0.0000]
    0.1 HTML_IMAGE_RATIO_04 BODY: HTML has a low ratio of text to image area
    0.3 HTML_MESSAGE BODY: HTML included in message
    0.0 HTML_NONELEMENT_00_10 BODY: 0% to 10% of HTML elements are non-standard
    0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars
    1.2 MISSING_SUBJECT Missing Subject: header

    (With a LOT of other interesting output.)

    I'm using MH which leaves each mail in a separate file.
    I'm not sure how you do this with other mail formats
    but I'm sure there is a way.

  6. Re: Spamassassin and spam

    A lot to do I see, well, I have my mailbox in /var/mail/user, tried to
    feed it the "mail do not delete" message, and got A LOT of complaining
    out of that, will wait until I get more mail, what I noticed though was
    that it treated it with the spam value I have given it in webmin. will
    try your script later when I get more trash in my mailbox.


    Roger

    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  7. Re: Spamassassin and spam

    Roger <""roger\"@the linuxmachine.invalid"> writes:

    > A lot to do I see, well, I have my mailbox in /var/mail/user, tried to
    > feed it the "mail do not delete" message, and got A LOT of complaining
    > out of that, will wait until I get more mail, what I noticed though
    > was that it treated it with the spam value I have given it in
    > webmin. will try your script later when I get more trash in my mailbox.


    My mail starts out in /var/mail/user.
    MH splits that file into one or more files using the From line
    as the delimiter. It ends up as a bunch of individual files
    with the same format.

    That's all you need to feed to spamassassin.

  8. Re: Spamassassin and spam

    Roger <""roger\"@the linuxmachine.invalid"> writes:

    > A lot to do I see, well, I have my mailbox in /var/mail/user, tried to
    > feed it the "mail do not delete" message, and got A LOT of complaining
    > out of that, will wait until I get more mail, what I noticed though
    > was that it treated it with the spam value I have given it in
    > webmin. will try your script later when I get more trash in my mailbox.


    To start, feed any file to spamassassin.
    All the debug output will tell you whether all the piece parts are
    working.

  9. Re: Spamassassin and spam (a little more info)

    On Sat, 15 Mar 2008 18:26:01 +0100, Roger wrote:

    > THIS is my procmailrc file:
    >
    > DROPPRIVS=yes
    > :0fw
    > | /usr/bin/spamassassin
    > :0
    > * ^X-Spam-Status: Yes
    > /dev/null


    https://qa.mandriva.com/show_bug.cgi?id=27484
    The /dev/null recipe action is not mentioned but it seems to suffer
    from the same (or a related) issue:

    :0
    * ^To:.*test@domain.invalid
    /dev/null

    $ cat spammail | /usr/bin/procmail -Y -a localhost
    /bin/sh: : No such file or directory
    procmail: Error while writing to ""

    Try a Procmail RPM from a pre-2007 Mandriva or rebuild the SRPM on a local
    machine and see if it fixes.





    --


    --
    Posted via a free Usenet account from http://www.teranews.com


  10. Re: Spamassassin and spam

    On Sat, 15 Mar 2008, Roger wrote:

    >
    > A lot to do I see, well, I have my mailbox in /var/mail/user, tried
    > to feed it the "mail do not delete" message, and got A LOT of
    > complaining out of that, will wait until I get more mail, what I
    > noticed though was that it treated it with the spam value I have
    > given it in webmin. will try your script later when I get more trash
    > in my mailbox.
    >


    Also spamassassin --lint

    is useful for spotting problems in your config

    Robert
    --
    La grenouille songe..dans son ch√Ęteau d'eau
    Links and things http://rmstar.blogspot.com/

  11. Re: Spamassassin and spam

    Robert Marshall skrev:
    > On Sat, 15 Mar 2008, Roger wrote:
    >
    >> A lot to do I see, well, I have my mailbox in /var/mail/user, tried
    >> to feed it the "mail do not delete" message, and got A LOT of
    >> complaining out of that, will wait until I get more mail, what I
    >> noticed though was that it treated it with the spam value I have
    >> given it in webmin. will try your script later when I get more trash
    >> in my mailbox.
    >>

    >
    > Also spamassassin --lint
    >
    > is useful for spotting problems in your config
    >
    > Robert


    Did as you told me, got no feedback from the --lint command, so I think
    the configuration is ok. I have tried to feed Postfix (local.cf file)
    the command "mailbox_command = /usr/bin/procmail" and I am waiting to
    see if this make things better, I am not sure how much time I am willing
    to spend with this, I think I will let the router and email computer be
    installed with Mandrake 2005 LE again, at least it worked out of the box...

    Roger
    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  12. Re: Spamassassin and spam

    Roger wrote:
    > I think I will let the router and email computer be installed with
    > Mandrake 2005 LE again, at least it worked out of the box


    Did you see the article Snowbat posted?
    pan.2008.03.16.04.18.43.391811@geocities.com

    The only thing I can offer is that .procmailrc needs to have
    permissions set to 0600 which is -rw-------
    http://snipurl.com/21whi

  13. Re: Spamassassin and spam

    Scott B. skrev:
    > Roger wrote:
    >> I think I will let the router and email computer be installed with
    >> Mandrake 2005 LE again, at least it worked out of the box

    >
    > Did you see the article Snowbat posted?
    > pan.2008.03.16.04.18.43.391811@geocities.com
    >
    > The only thing I can offer is that .procmailrc needs to have
    > permissions set to 0600 which is -rw-------
    > http://snipurl.com/21whi


    Thanks a lot!!!
    I am so sorry, I never saw that big blue link, right in front of
    me...must be age....sorry!!!!!!!!!
    I read the article, seems like I am not the only one..

    All the best

    Roger

    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  14. Re: Spamassassin and spam

    Roger wrote:
    > I have tried to feed Postfix (local.cf file) the command
    > "mailbox_command = /usr/bin/procmail"


    I put that line in /etc/postfix/main.cf for my standalone box at home
    that has Mandriva Linux 2008.0 Free installed.

    My ISP uses Spamassassin, so I have not had to install it. I adjust
    the "aggressiveness" level via WWW, and I have the following recipe
    on my ISP's box in .procmailrc in my home directory on their box:

    :0
    * ^X-Spam-Flag: YES
    {
    LOG="SPAMASSASSIN - "
    :0
    /dev/null
    }

    That recipe will cause procmail to deliver email with the
    X-Spam-Flag: YES line in the header to /dev/null and add
    SPAMASSASSIN -
    to the beginning of the section for that email in my procmail
    logfile.

    procmailrc needs to have permissions set to 0600

  15. Re: Spamassassin and spam

    Roger wrote:
    > I read the article, seems like I am not the only one


    Snowbat's suggestion was:
    "Try a Procmail RPM from a pre-2007 Mandriva or rebuild the SRPM on a
    local machine and see if it fixes."

  16. Re: Spamassassin and spam

    Thanks for all your effort =0)
    I have applied your recipe and are waiting and testing, I also chomed'ed
    procmailrc to 0600 as I was told by you and snowbat.
    Thanks again.
    Will post back tomorrow to let you know if this was a success.

    All the best

    Roger
    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  17. Re: Spamassassin and spam (a little more info)

    Snowbat skrev:
    > On Sat, 15 Mar 2008 18:26:01 +0100, Roger wrote:
    >
    >> THIS is my procmailrc file:
    >>
    >> DROPPRIVS=yes
    >> :0fw
    >> | /usr/bin/spamassassin
    >> :0
    >> * ^X-Spam-Status: Yes
    >> /dev/null

    >
    > https://qa.mandriva.com/show_bug.cgi?id=27484
    > The /dev/null recipe action is not mentioned but it seems to suffer
    > from the same (or a related) issue:
    >
    > :0
    > * ^To:.*test@domain.invalid
    > /dev/null
    >
    > $ cat spammail | /usr/bin/procmail -Y -a localhost
    > /bin/sh: : No such file or directory
    > procmail: Error while writing to ""


    Thanks a lot Snowbat for the link!!!!!!!
    >
    > Try a Procmail RPM from a pre-2007 Mandriva or rebuild the SRPM on a local
    > machine and see if it fixes.


    I am not feeling competent to do this, have never tried such a thing as
    rebuilding rpm's.
    I tried to install procmail from a 2005 LE cd, but it complained about
    missing files...so...I never walked any further down that path.

    Roger
    --
    Mandriva Linux 2008 (Linuxcounter #432950)

    MSI K8TM, 1,0 Gb Memory, AMD Sempron 3000+ CPU
    ATI Sapphire Radeon X1600
    __________________________________________________
    Be towards others the way
    you want to be treated yourself

  18. Re: Spamassassin and spam

    Here is a URL for a sample procmailrc file written by the author of
    the Spambouncer:
    http://snipurl.com/21wjs
    The author has not maintained the Spambouncer for almost two years,
    and sometimes I have connectivity problems with the spambouncer.org
    domain, so the above URL is for an Internet Archive Wayback Machine
    webpage.

    The backup cache recipe section for that sample procmailrc file may
    be interesting. My .procmailrc file is based on that same file but
    from approx. ten years ago, and the sample procmailrc file at the
    above URL is from July 20, 2005. My older recipe only backs up the
    most recent 100 emails, and the newer recipe at the URL above backs
    up the most recent 1000 emails.

    If you don't use the Spambouncer set of procmail recipes, I think the
    recipe that starts with the comment
    "# Call SpamBouncer, but make sure you skip any REALLY big emails"
    should probably be commented out.

    I use the Spambouncer set of procmail recipes after procmail checks
    for the Spamassassin spam flag, and I am excited to try out the newer
    backup cache recipe from the URL above.

    I pasted below the relevant recipes from my older procmailrc in case
    anyone wants to try them. I know the backup cache recipe works on
    my ISP's box; my ISP uses procmail v3.21 2001/06/29.

    # Generate correct "Lines:" header for use with Maildir format.
    :0 Bfh
    * H ?? !^Lines:
    * -1^0
    * 1^1 ^.*$
    | formail -A "Lines: $="

    # Create a backup cache of 100 most recent messages in case of
    # mistakes.
    # For this to work, you must first create the directory
    # ${MAILDIR}/backup.
    :0 c
    backup

    :0 ic
    | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`

    # Regenerate "From" lines to make sure they are valid
    :0 fhw
    | formail -I "From " -a "From "

  19. Re: Spamassassin and spam (a little more info)

    Roger wrote:
    > Snowbat skrev:
    >> On Sat, 15 Mar 2008 18:26:01 +0100, Roger wrote:
    >>
    >>> THIS is my procmailrc file:
    >>>
    >>> DROPPRIVS=yes
    >>> :0fw
    >>> | /usr/bin/spamassassin
    >>> :0
    >>> * ^X-Spam-Status: Yes
    >>> /dev/null

    >>
    >> https://qa.mandriva.com/show_bug.cgi?id=27484
    >> The /dev/null recipe action is not mentioned but it seems to suffer
    >> from the same (or a related) issue:
    >>
    >> :0
    >> * ^To:.*test@domain.invalid
    >> /dev/null
    >>
    >> $ cat spammail | /usr/bin/procmail -Y -a localhost
    >> /bin/sh: : No such file or directory
    >> procmail: Error while writing to ""

    >
    > Thanks a lot Snowbat for the link!!!!!!!
    >>
    >> Try a Procmail RPM from a pre-2007 Mandriva or rebuild the SRPM on a local
    >> machine and see if it fixes.

    >
    > I am not feeling competent to do this, have never tried such a thing as
    > rebuilding rpm's.
    > I tried to install procmail from a 2005 LE cd, but it complained about
    > missing files...so...I never walked any further down that path.


    Here is a URL for documentation about compiling source code:
    http://snipurl.com/21wlp

    That URL is for an Internet Archive Wayback Machine URL that has
    information from six or seven years ago that is still relevant.

  20. Re: Spamassassin and spam

    On Sun, 16 Mar 2008 15:53:00 -0700, Scott B. wrote:

    > :0
    > * ^X-Spam-Flag: YES
    > {
    > LOG="SPAMASSASSIN - "
    > :0
    > /dev/null
    > }
    >
    > That recipe will cause procmail to deliver email with the
    > X-Spam-Flag: YES line in the header to /dev/null and add
    > SPAMASSASSIN -
    > to the beginning of the section for that email in my procmail
    > logfile.


    (Procmail from 2008.1 Cooker) It seems that a /dev/null recipe
    action works if the recipe is placed before a recipe that pipes the mail
    through spamassassin but does not work if placed after. I'll retest this
    later to confirm.







    --
    Posted via a free Usenet account from http://www.teranews.com


+ Reply to Thread
Page 1 of 2 1 2 LastLast