spam scan with header change and pass

Discussion in 'Installation/Configuration' started by acumen, Apr 12, 2010.

  1. acumen

    acumen New Member

    Some of my client report that they cannot receive some of the emails, sequence is a bit high. So, is there any way that I can set the email server to scan the emails and then marked [SPAM] in Subject and let the email PASS but dropped into a SPAM folder under the user's folder? just like google's spam folder. It's impossible to set in client side, webmail, because it only affect when user check email through webmail but outlook. So, what I want to do is, when clamav or amavisd scanned this is a spam, it will drop the mail to the SPAM folder directly.

    Thanks!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure. Change or select a spam filter policy so that it changes the subject of the email e.g. to [SPAM] and then use a email filter in the mail account to move the tagged email to a maildir of your choice.
     
  3. acumen

    acumen New Member

    So, I have to set this filter by user seperately? Is there any global filter that I can set in the ISPConfig? If no, where can I edit the config file to enable this filter?

    Anyway, I tried the edit the spam lover to amend the subjuct line with [SPAM] beginning, then, go to my personal account and add a filter to move the mail if (begin with / contain) [SPAM]. Of course the SPAM folder created in webmail already. Then I send an email with the word [SPAM] in front, but the email still can deliver to my inbox.
     
  4. acumen

    acumen New Member

    here's the real email and marked [SPAM] by server but still deliver to inbox instead drop into SPAM folder. I copied the full header here.

    -----
    Return-Path: <[email protected]>
    Received: from localhost (unknown [127.0.0.1])
    by hostserver.abc.com (Postfix) with ESMTP id C67C9332D
    for <[email protected]>; Tue, 13 Apr 2010 03:06:29 +0000 (UTC)
    X-Virus-Scanned: amavisd-new at hostserver.abc.com
    X-Spam-Flag: NO
    X-Spam-Score: 5.763
    X-Spam-Level: *****
    X-Spam-Status: No, score=5.763 tagged_above=3 required=999
    tests=[BAYES_50=0.8, EXTRA_MPART_TYPE=1, HTML_FONT_FACE_BAD=0.981,
    HTML_IMAGE_ONLY_12=2.059, HTML_MESSAGE=0.001, RAZOR2_CHECK=0.922]
    autolearn=no
    Received: from hostserver.abc.com ([127.0.0.1])
    by localhost (hostserver.abc.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id 9zKMneyUz-mM for <[email protected]>;
    Tue, 13 Apr 2010 11:06:25 +0800 (HKT)
    Received: from ims.ispuplink.com (ims.ispuplink.com [213.97.250.171])
    by hostserver.abc.com (Postfix) with ESMTP id 837D13220
    for <[email protected]>; Tue, 13 Apr 2010 11:06:25 +0800 (HKT)
    Received: from imsantv77.ispuplink.com (imsantv77b.ispuplink.com [213.97.250.79])
    by ims.ispuplink.com (8.14.2/8.14.2) with ESMTP id o3D36JZM013716
    for <[email protected]>; Tue, 13 Apr 2010 11:06:24 +0800
    Received: from [213.97.250.176] ([213.97.250.176:55468] helo=imsantv70.ispuplink.com)
    by imsantv77 (envelope-from <[email protected]>)
    (ecelerity 2.2.2.40 r(29895/29896)) with ESMTP
    id B1/DC-25338-EAFD3CB4; Tue, 13 Apr 2010 11:06:23 +0800
    Received: from everbest051786 (174.77.198.203.static.ispuplink.com [211.188.77.174])
    by imsantv70.ispuplink.com (8.14.2/8.14.2) with SMTP id o3D36EuX006553;
    Tue, 13 Apr 2010 11:06:14 +0800
    Message-ID: <73FB8B61899945519B291457BBE0A0EE@everbest051786>
    From: "Everbest-Kenny" <[email protected]>
    To: <"Undisclosed-Recipient:;"@hostserver.abc.com>
    Subject:
    [SPAM]=?big5?B?QVhJU626s6Ezpsq4VbmzMTA4MHAgSERUViBmaXhlZCBjYW1lcmEtLVAxMzQ2IA==?=
    =?big5?B?obRQLWlyaXOhtKZoqKSr17VlrbGm6qx5obSldKazNzIwcKTOU1ZHQausuLmhtA==?=
    =?big5?B?SC4yNjShtERheSZOaWdodKG0UG9F?=
    Date: Tue, 13 Apr 2010 11:06:13 +0800
    MIME-Version: 1.0
    Content-Type: multipart/related;
    type="multipart/alternative";
    boundary="----=_NextPart_000_0325_01CADAF9.54F00B50"
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: Microsoft Outlook Express 6.00.2900.5843
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
    -----
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This is no spam email as you set the tag levels wrong and therefor it has been marked as not spam. Also undo the change in the spam lover settings and any other settings you did. The tag levels must be e.g.:

    Spam Tag Level: 1
    Spam Tag Level 2: 4
    Spam Kill Level: 25
    SPAM dsn cutoff level: 0
    SPAM quarantine cutoff level: 0
    SPAM modifies subject: yes
    Spam subject tag:
    Spam subject tag 2: [SPAM]
     
  6. acumen

    acumen New Member

    So, Till, where can I set the filter to apply to a domain or the whole system?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    In the domain settings.
     
  8. acumen

    acumen New Member

    I mean after apply the spam filter which I just setup for modify the subject, I also need a mail filter to move the mail with subject [SPAM], right? But I can only see the mail filter under Email Mailbox.

    Is there any way to apply the mail filter to the whole domain? Thanks.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    No, as mail filters depend on the mailbox. If you want to set a filter globally for the whole server, take a look at the .mailfilter file in /var/vmail/
     
  10. acumen

    acumen New Member

    So, is there any way to set default mailfilter when a new mail user created? This can be a hard coded in ISPConfig or I can edit any config file. Thanks Till.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Please see my answer in #9. I posted you the path to the file were you can add a global filter.
     

Share This Page