virt user/domain yadda yadda - spam scanning not worknig

Discussion in 'HOWTO-Related Questions' started by sph33r, Aug 8, 2008.

  1. sph33r

    sph33r New Member

    Yet another question about the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) tutorial.

    I followed the instructions to a "T" .. I have double, triple, quadruple checked my entries.. I've even went through the workaround.org tut and tried his amavis/spammassassin settings.. and still it does not scan for spam.

    I have tried it with razor/pyzor/bayes stuff enabled/disabled (did not install DCC), I've changed settings in the 20-debian_defaults to every possible choice.. it IS marked as default to rename to ***SPAM*** and yet, when I send the test spamassassin virus email, it gets nothing. Check out the header, it doesn't even say anything about spam. (Note: i have edited out the server/email specifics)

    Code:
    Return-Path: <[email protected]>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: from localhost (localhost.localdomain [127.0.0.1])
         by SRV.DOMAIN.com (Postfix) with ESMTP id AA3FCCD62F
         for <[email protected]>; Fri, 8 Aug 2008 10:35:10 -0400 (EDT)
    X-Quarantine-ID: <N+WcR1PJpdNw>
    X-Virus-Scanned: Debian amavisd-new at SRV.DOMAIN.com
    Received: from SRV.DOMAIN.com ([127.0.0.1])
         by localhost (SRV.DOMAIN.com [127.0.0.1]) (amavisd-new, port 10024)
         with ESMTP id N+WcR1PJpdNw for <[email protected]>;
         Fri, 8 Aug 2008 10:35:09 -0400 (EDT)
    Received: by SRV.DOMAIN.com (Postfix, from userid 0)
         id B910ECD630; Fri, 8 Aug 2008 10:35:09 -0400 (EDT)
    Subject: Test spam mail (GTUBE)
    Message-ID: <[email protected]>
    Date: Wed, 23 Jul 2003 23:30:00 +0200
    From: Sender <[email protected]>
    To: Recipient <[email protected]>
    Precedence: junk
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Nothing! I purged amavisd and re-installed.. went back through the setup, still nothing.

    My postfix config files do have the following lines:
    content_filter=smtp-amavis:[127.0.0.1]:10024
    receive_override_options=no_address_mappings

    Spam & virus checks are uncommented in 15-content-filter-mode as well.

    Any ideas?
     
    Last edited: Aug 8, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
     
  3. sph33r

    sph33r New Member

    I haven't seen any.. in fact, here's the log entry of an email attempting to be delivered. (seems to get quarantined for a virus which IS working since I get a lot of emails every day for that).


    Code:
    Aug 11 06:44:31 xs1 postfix/qmgr[22700]: 56F91CD930: from=<[email protected]>, size=1536, nrcpt=1 (queue active)
    Aug 11 06:44:31 xs1 amavis[4458]: (04458-13) Passed SPAM, [81.94.106.34] [81.94.106.34] <[email protected]> -> <[email protected]>, quarantine: H/spam-H862DXlTJzRZ.gz, Message-ID: <01c8fba7$9d47d5a0$226a5e51@district0>, mail_id: H862DXlTJzRZ, Hits: 20.572, size: 1024, queued_as: 56F91CD930, 1030 ms
    Aug 11 06:44:31 xs1 postfix/smtp[25095]: 56FE2CD92F: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=2, delays=0.99/0.01/0/1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 56F91CD930)
    Aug 11 06:44:31 xs1 postfix/qmgr[22700]: 56FE2CD92F: removed
    Aug 11 06:44:31 xs1 postfix/virtual[25100]: 56F91CD930: to=<[email protected]>, relay=virtual, delay=0.03, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
    Aug 11 06:44:31 xs1 postfix/qmgr[22700]: 56F91CD930: removed
    
    It even says it passed spam but I'm getting nothing that is tagged as spam ever. If I change the setting in 20-debian_defaults to D_BOUNCE, I get less mail. If I change it to D_PASS, I get more mail. That alone should indicate that there is a lot of spam but nothing showing up in my inbox has a spam tagged subject or even a mention in the headers that it was scanned.

    I know there should be a ton of spam being tagged for my personal account. I just moved from a Debian server (running ispconfig and your perfect server setup) to an Ubuntu server running the setup from the virtual email hosting with mysql so I know that I should be getting a ton of stuff tagged as spam yet I'm not. I'm getting a lot of emails with words like viagra and cialas in the subject which is almost universal for spam.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Did you enable quarantining for spam and viruses? If so, please disable that and try again.
     
  5. sph33r

    sph33r New Member

    Well I apparently do have quarantine setup for virii since I'm getting emails about it and the /var/lib/amavis/virusmails is full of junk. I'd like to find a way to just dump those instead of storing them.

    But anyway... I couldn't seem to find a place where I can toggle that on or off? And I definitely couldn't find a spam quarantine.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    You can do that in your amavisd configuration.
     
  7. sph33r

    sph33r New Member

    I believe I have found the issue.

    https://bugs.launchpad.net/ubuntu/+source/amavisd-new/+bug/55723

    As you can see, the @local_domains_acl = ( ".$mydomain" ); line isn't set properly in Ubuntu/Debian and must be defined.

    I added that line to my /etc/amavis/conf.d/50-user directory and replaced the .$mydomain with a list of domains that are receiving emails on my server.

    I lowered my minimum spam tag number to zero so it always tags the spam header (not to be confused with lowering the actual spam threshold) and now I am getting spam headers in my emails. Time shall tell if things actually get stopped.
     

Share This Page