Bypass locally relayed email - SpamAssassin

This is a discussion on Bypass locally relayed email - SpamAssassin ; Hi, Hoping somebody can help with a problem. For some time now, many of our customers have been complaining that email that originates from our mail exchange (local relays) is not being delivered to their customers. I have checked rdns, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Bypass locally relayed email

  1. Bypass locally relayed email

    Hi,



    Hoping somebody can help with a problem. For some time now, many of our
    customers have been complaining that email that originates from our mail
    exchange (local relays) is not being delivered to their customers. I
    have checked rdns, blacklists, etc. I really am not sure why, but I am
    trying some experiments. One potential issue I have noticed is spam
    checking headers for locally relayed emails.



    I have all my local networks specified by the line:

    trusted_networks 192.168.1.0/24 10.184.0.0/24



    This certainly adds the ALL_TRUSTED test to my headers for emails that
    come from servers that those ip ranges. However, I suspect that perhaps,
    part of the issue with these emails not getting through (yahoo and
    hotmail rejected some of my test emails, but gmail let them through) is
    that the message already has X-SPAM headers with a positive score
    (although under the 5.0 threshold.) I was hoping to completely bypass
    spamassassin for mail originating in the local ip range or at least
    strip those emails of any spam checking headers. Any ideas how to
    accomplish this?



    The mail server is running Debian with Sendmail, spamassassin milter,
    and spamassassin configured site-wide. The milter is accessed via
    sendmail.mc line:

    INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/sendmail/spamass.sock
    , F=,T=S:4m;R:4m;E:10m')dnl



    Thanks, I really appreciate you reading this.



    Brett Millett



  2. Message-ID:Reply-To:References:MIME-Version:Content-Type:In-Reply-To; b=yWAhWt3/FzFrQ5JKK5EIoXgXhHDC+ScxeOIGwav4Sb3E32/hM+9md+OD1L8YarId8yFwEHFkhGbDJi3Lym6mk0nlFgiaE5xUM WczrEesTZ1AbjInq1DDG5wDCfhJuvvn6c9sH/gT34I1ZzLrwjL7gos4W/7WiSbq0EOcwqDVRfo=

    On Mon, Sep 08, 2008 at 09:18:38PM -0600, Brett Millett wrote:
    >
    > I was hoping to completely bypass spamassassin for mail originating in the
    > local ip range or at least strip those emails of any spam checking
    > headers. Any ideas how to accomplish this?
    >
    > The mail server is running Debian with Sendmail, spamassassin milter,
    > and spamassassin configured site-wide. The milter is accessed via
    > sendmail.mc line:
    >
    > INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/sendmail/spamass.sock
    > , F=,T=S:4m;R:4m;E:10m')dnl


    man spamass-milter

    -i networks
    Ignores messages if the originating IP is in the network(s)
    listed. The message will be passed through without calling Spa-
    mAssassin at all. networks is a comma-separated list, where each
    element can be either an IP address (nnn.nnn.nnn.nnn), a CIDR
    network (nnn.nnn.nnn.nnn/nn), or a network/netmask pair
    (nnn.nnn.nnn.nnn/nnn.nnn.nnn.nnn). Multiple -i flags will append
    to the list. For example, if you list all your internal net-
    works, no outgoing emails will be filtered.


  3. RE: Bypass locally relayed email

    Damn! I should have RTFM!

    Okay, I'm showing my inexperience here...

    Firstly, thanks a lot Jared! Good to know this option exists. Also,
    thanks to Henrik. I guess this would have been the easiest option since
    apparently ShortCircuit.pm didn't exist.

    Now, for the small fiasco...

    When I ran a spamassassin -V, it showed the debian package 3.1.7-deb
    (latest on etch.) Since that version was less than 3.2x I got a little
    wreckless and did:

    # cpan install loadplugin Mail::SpamAssassin::Plugin::Shortcircuit

    Of course, in the process of upgrading dependences, SpamAssassin also
    was updated. Now a version check shows:

    SpamAssassin version 3.2.5
    running on Perl version 5.8.8

    All seems to be running fine except for several errors on reload:

    spamd[892]: plugin: eval failed: Can't locate object method
    "set_spamd_result_item" via package "Mail::SpamAssassin::PerMsgStatus"
    at /usr/local/share/perl/5.8.8/Mail/SpamAssassin/Plugin/Shortcircuit.pm
    line 293, line 60.

    Now this probably has something to do with the fact that according to
    email logs, sendmail is still firing up the old version.
    Milter add: header: X-Spam-Checker-Version: SpamAssassin 3.1.7-deb.

    Now, I checked and spamd which /etc/init.d/spamassassin calls returns
    version 3.2.5 as well. Not sure why that header saying 3.1.7-deb is
    still coming through.

    Of course the short-circuiting isn't working So, I commented out the
    plugin line. Then I added my local networks to
    /etc/defaults/spamass-milter. I saw no Shortcircuit.pm errors and
    furthermore, no headers from mail that originates from a host in that
    network range.

    Thanks for all your help.

    Brett Millett


    -----Original Message-----
    From: Henrik K [mailto:hege@hege.li]
    Sent: Monday, September 08, 2008 10:27 PM
    To: users@spamassassin.apache.org
    Subject: Re: Bypass locally relayed email

    On Mon, Sep 08, 2008 at 09:18:38PM -0600, Brett Millett wrote:
    >
    > I was hoping to completely bypass spamassassin for mail originating in

    the
    > local ip range or at least strip those emails of any spam checking
    > headers. Any ideas how to accomplish this?
    >
    > The mail server is running Debian with Sendmail, spamassassin milter,
    > and spamassassin configured site-wide. The milter is accessed via
    > sendmail.mc line:
    >
    >

    INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/sendmail/spamass.sock
    > , F=,T=S:4m;R:4m;E:10m')dnl


    man spamass-milter

    -i networks
    Ignores messages if the originating IP is in the network(s)
    listed. The message will be passed through without calling Spa-
    mAssassin at all. networks is a comma-separated list, where each
    element can be either an IP address (nnn.nnn.nnn.nnn), a CIDR
    network (nnn.nnn.nnn.nnn/nn), or a network/netmask pair
    (nnn.nnn.nnn.nnn/nnn.nnn.nnn.nnn). Multiple -i flags will append
    to the list. For example, if you list all your internal net-
    works, no outgoing emails will be filtered.


+ Reply to Thread