Send "destiny=DISCARD" emails to mailbox

Discussion in 'ISPConfig 3 Priority Support' started by rob_morin, Oct 23, 2018.

  1. rob_morin

    rob_morin Member

    Hello all...
    Can i send all emails with destiny=DISCARD to mailbox rather than delete them?
    My normal policy details are like so:

    Policy tab: Normal
    Everything is set to No

    Quarantine Tab:
    Everything set to [email protected]
    Tag-level Tab:
    SPAM tag level: -999.00
    SPAM tag2 level: 4.80
    SPAM kill level: 8.0
    SPAM dsn cutoff level: 0.00
    SPAM quarantine cutoff level: 0.00
    SPAM modifies subject: Yes
    SPAM subject tag: Null
    SPAM subject tag2: *** SPAM ***

    Other Tab: left at default, all settings

    Thanks...
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The messages with that status exceeded the kill level, to get all emails delivered to your mailbox, set the spam kill level to a very high value.
     
  3. rob_morin

    rob_morin Member

    I would like only kill level 8 and beyond to go to spam box, the emails that would normally be deleted I don't want all emails marked as spam only the ones marked for be deletion
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, then set spam tag 2 level to 8 and spam kill level to e.g. 900. This will make emails with spam score above 8 to go to the spam folder. Emails with score below 8 do not spam then anymore of course.
     
  5. rob_morin

    rob_morin Member

    Thanks for your replay Till.... I did what you say, but it did not send the email to the spam box email address, which is [email protected]
    Here is the log of a test email sent, am i forgetting something?

    Oct 24 12:04:34 one amavis[29077]: (29077-18) ESMTP :10024 /var/lib/amavis/tmp/amavis-20181024T095341-29077-jbn5c7E_: <[email protected]> -> <[email protected]> SIZE=3176 Received: from mx1.2box.ca ([127.0.0.1]) by localhost (one.2box.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <[email protected]>; Wed, 24 Oct 2018 12:04:34 -0400 (EDT)
    Oct 24 12:04:34 one postfix/smtpd[4079]: disconnect from mail-qt1-f179.google.com[209.85.160.179] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
    Oct 24 12:04:34 one amavis[29077]: (29077-18) smtp connection cache, dt: 106.2, state: 0
    Oct 24 12:04:34 one amavis[29077]: (29077-18) body hash: 3f739158c7471e1d88f7224a36b9f54e
    Oct 24 12:04:34 one amavis[29077]: (29077-18) trace: ESMTP://[127.0.0.1]:55556 < ESMTPS://[209.85.160.179]:34744 < SMTP://x < ESMTPSA://207.115.98.186
    Oct 24 12:04:34 one amavis[29077]: (29077-18) dkim: VALID Author+Sender+MailFrom signature by d=bbbbbb.com, From: <[email protected]>, a=rsa-sha256, c=relaxed/relaxed, s=google, [email protected]
    Oct 24 12:04:34 one amavis[29077]: (29077-18) Checking: q5-QvrSXob_P [209.85.160.179] <[email protected]> -> <[email protected]>
    Oct 24 12:04:34 one amavis[29077]: (29077-18) 2822.From: <[email protected]>
    Oct 24 12:04:34 one amavis[29077]: (29077-18) p001 1 Content-Type: text/plain, size: 129 B, name:
    Oct 24 12:04:34 one amavis[29077]: (29077-18) Checking for banned types and filenames
    Oct 24 12:04:34 one amavis[29077]: (29077-18) collect banned table[0]: [email protected], tables:
    Oct 24 12:04:34 one amavis[29077]: (29077-18) collect banned table[1]: [email protected], tables:
    Oct 24 12:04:34 one amavis[29077]: (29077-18) collect banned table[2]: [email protected], tables: DEFAULT=>Amavis::Lookup::RE=ARRAY(0x223a8b8)
    Oct 24 12:04:34 one amavis[29077]: (29077-18) p.path [email protected]: "P=p001,L=1,M=text/plain,T=asc"
    Oct 24 12:04:34 one amavis[29077]: (29077-18) run_av Using (ClamAV-clamd): (code) CONTSCAN /var/lib/amavis/tmp/amavis-20181024T095341-29077-jbn5c7E_/parts\n
    Oct 24 12:04:34 one amavis[29077]: (29077-18) ClamAV-clamd: Connecting to socket /var/run/clamav/clamd.ctl
    Oct 24 12:04:34 one amavis[29077]: (29077-18) new socket by IO::Socket::UNIX to /var/run/clamav/clamd.ctl, timeout set to 10
    Oct 24 12:04:34 one amavis[29077]: (29077-18) ClamAV-clamd: Sending CONTSCAN /var/lib/amavis/tmp/amavis-20181024T095341-29077-jbn5c7E_/parts\n to socket /var/run/clamav/clamd.ctl
    Oct 24 12:04:34 one amavis[29077]: (29077-18) rw_loop read: got eof
    Oct 24 12:04:34 one amavis[29077]: (29077-18) run_av (ClamAV-clamd): CLEAN
    Oct 24 12:04:34 one amavis[29077]: (29077-18) run_av (ClamAV-clamd) result: clean
    Oct 24 12:04:34 one amavis[29077]: (29077-18) calling SA parse (0), SA vers 3.4.1, 3.004001, data as STRING_REF, recips_ind [0], user: "amavis"
    Oct 24 12:04:35 one amavis[29077]: (29077-18) _WARN: pyzor: check failed: internal error, python traceback seen in response
    Oct 24 12:04:35 one amavis[29077]: (29077-18) spam_scan: score=999.999 autolearn=no autolearn_force=no tests=[BAYES_00=0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,GTUBE=1000,SPF_PASS=-0.001] recips=0
    Oct 24 12:04:35 one amavis[29077]: (29077-18) blocking contents category is (6) for [email protected], final_destiny 0
    Oct 24 12:04:35 one amavis[29077]: (29077-18) do_notify_and_quar: ccat=Spam (6,0) ("6":Spam, "5":Spammy, "1,1":CleanTag, "1":Clean, "0":CatchAll) ccat_block=(6), qar_mth=
    Oct 24 12:04:35 one amavis[29077]: (29077-18) do_notify_and_quarantine: spam level exceeds quarantine cutoff level 0
    Oct 24 12:04:35 one amavis[29077]: (29077-18) delivery method is 1, recips: [email protected]
    Oct 24 12:04:35 one amavis[29077]: (29077-18) DSN: sender is credible (dkim), SA: 999.999, <[email protected]>
    Oct 24 12:04:35 one amavis[29077]: (29077-18) status counters: InMsgsStatus{Discarded,DiscardedInbound}
    Oct 24 12:04:35 one amavis[29077]: (29077-18) Blocked SPAM {DiscardedInbound}, [209.85.160.179]:34744 [207.115.98.186] <[email protected]> -> <[email protected]>, Queue-ID: 9902581106, Message-ID: <[email protected]>, mail_id: q5-QvrSXob_P, Hits: 999.999, size: 3175, dkim_sd=google:bbbbbb.com, 475 ms
    Oct 24 12:04:35 one amavis[29077]: (29077-18) TIMING-SA total 359 ms - parse: 1.25 (0.3%), extract_message_metadata: 2.9 (0.8%), get_uri_detail_list: 0.16 (0.0%), tests_pri_-1000: 16 (4.5%), tests_pri_-950: 0.61 (0.2%), tests_pri_-900: 0.86 (0.2%), tests_pri_-90: 12 (3.3%), check_bayes: 10 (2.9%), b_tokenize: 3.3 (0.9%), b_tok_get_all: 2.4 (0.7%), b_comp_prob: 2.8 (0.8%), b_tok_touch_all: 0.23 (0.1%), b_finish: 0.50 (0.1%), tests_pri_0: 55 (15.3%), check_spf: 3.8 (1.1%), poll_dns_idle: 0.04 (0.0%), tests_pri_10: 136 (37.9%), check_dcc: 134 (37.4%), tests_pri_20: 52 (14.4%), check_razor2: 51 (14.1%), tests_pri_30: 57 (16.0%), check_pyzor: 56 (15.5%), tests_pri_500: 6 (1.6%), get_report: 0.39 (0.1%)
    Oct 24 12:04:35 one amavis[29077]: (29077-18) sending SMTP response: "250 2.7.0 Ok, discarded, id=29077-18 - spam"
    Oct 24 12:04:35 one postfix/smtp[6071]: 9902581106: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.76, delays=0.27/0.01/0/0.47, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=29077-18 - spam)
    Oct 24 12:04:35 one postfix/qmgr[31403]: 9902581106: removed
    Oct 24 12:04:35 one amavis[29077]: (29077-18) size: 3175, TIMING [total 477 ms] - SMTP greeting: 1.3 (0%)0, SMTP EHLO: 0.8 (0%)0, SMTP pre-MAIL: 0.3 (0%)1, lookup_sql: 2.5 (1%)1, SMTP pre-DATA-flush: 1.1 (0%)1, SMTP DATA: 34 (7%)8, check_init: 0.9 (0%)9, digest_hdr: 1.5 (0%)9, digest_body_dkim: 28 (6%)15, collect_info: 2.0 (0%)15, mime_decode: 4.0 (1%)16, get-file-type1: 16 (3%)19, parts_decode: 0.1 (0%)19, check_header: 0.6 (0%)19, AV-scan-1: 6 (1%)21, lookup_sql: 1.3 (0%)21, lookup_sql: 0.4 (0%)21, spam-wb-list: 0.3 (0%)21, SA msg read: 0.3 (0%)21, SA parse: 2.0 (0%)22, SA check: 357 (75%)96, decide_mail_destiny: 9 (2%)98, notif-quar: 0.7 (0%)98, prepare-dsn: 1.8 (0%)99, report: 1.4 (0%)99, main_log_entry: 2.7 (1%)100, update_snmp: 0.7 (0%)100, SMTP pre-response: 0.3 (0%)100, SMTP response: 0.2 (0%)100, unlink-1-files: 0.1 (0%)100, rundown: 0.6 (0%)100
    Oct 24 12:04:35 one amavis[29077]: (29077-18) load: 0 %, total idle 7820.495 s, busy 32.880 s
     
  6. rob_morin

    rob_morin Member

    BTW, my new settings are below as per your post:

    Tag-level Tab:
    SPAM tag level: -999.00
    SPAM tag2 level: 8.00
    SPAM kill level: 900.00
    SPAM dsn cutoff level: 0.00
    SPAM quarantine cutoff level: 0.00
    SPAM modifies subject: Yes
    SPAM subject tag: Null
    SPAM subject tag2: *** SPAM ***
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Tagged spam is sent to the junk imap folder of the mailbox where you activate that rule. You have to enable the option to filter junk in the mailbox on the filter tab for that.
     
  8. rob_morin

    rob_morin Member

    But i ma talking on a global level.... i do not want to send spam with a very high score to a users mailbox. I want to send it to one general mailbox that only i can access, say [email protected] Then any of my domains that receive an email that is high in spam, the spam goes there, rather than be deleted. Any spam marked as 8 and lower can be delivered as normal.
    This has to be a a global level not for each mailbox.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try to enter an email address in the field "Forward spam to email" of that spamfilter policy?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    And if that does not work, try the field 'SPAM admin' as well.
     
  11. rob_morin

    rob_morin Member

    In the Quarantine tab all entries have the spambox email address in there like [email protected]
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. your test spam mail has a level above 900, which no normal spam mail can reach. as 999.999 is above the kill level which we have set to 900, the mail must have been deleted. either use a spam email with score > 8 and < 900 or set kill level to > 999.999
     
  13. rob_morin

    rob_morin Member

    Everything is good now after adding the mailbox address to spam admin and header admin and all those settings under the "Other" tab
    Thanks..
     
    till likes this.

Share This Page