Spam is not sorted into Junk Folder

Hi there!

I just installed kopano on my new server. The system (postfix/amavis) is checking all incoming mails for spam, amavis is marking all spam mails with “X-Spam-Flag=Yes”. I edited the dagent.cfg, to look for this words, but all mails are sorted to the incoming folder. Where can I look for wrong config ?

I need help :-)

greets Thomas

Hi Thomas

@teka74 said in Spam is not sorted into Junk Folder:

I just installed kopano on my new server. The system (postfix/amavis) is checking all incoming mails for spam, amavis is marking all spam mails with “X-Spam-Flag=Yes”. I edited the dagent.cfg, to look for this words, but all mails are sorted to the incoming folder. Where can I look for wrong config ?

Are you delivering to Kopano via LMTP or are you invoking the kopano-dagent directly?

Bo

Hi Bo

I’m delivering via LMTP, as suggested as standard in kopano manual

Thomas

Ha, after several tests, i got it !

dagent now looks for X-Spam-Status, there is a “no” or “yes” in 1st position, followed by the spam score and the dkim status etc.

But it works ! Spam mails now sorted correctly in the junk folder.

a test email header:

.....
X-Original-To: thomas.kimpel@wahlshausen.de
X-Spam-Flag: YES
X-Spam-Score: 8.945
X-Spam-Level: ********
X-Spam-Status: Yes, score=8.945 tagged_above=-999 required=6.2
 tests=[DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
 HTML_IMAGE_RATIO_04=0.61, HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.105,
 RAZOR2_CF_RANGE_51_100=0.365, RAZOR2_CF_RANGE_E8_51_100=2.43,
 RAZOR2_CHECK=1.729, RCVD_IN_SBL=2.596, RP_MATCHES_RCVD=-0.001,
 SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=no autolearn_force=no
X-Csa-Complaints: whitelist-complaints@eco.de
X-Kasloop: v07695717
X-Ui-Out-Filterresults: junk:10;V01:K0:crw8+nAOsa4=:xVfQSSYm6Ep+vD4Xg4bMRrCW

part of my dagent.cfg:

spam_header_name = X-Spam-Status
spam_header_value = Yes

Thanks for help

Thomas

@teka74 said in Spam is not sorted into Junk Folder:

dagent now looks for X-Spam-Status, there is a “no” or “yes” in 1st position, followed by the spam score and the dkim status etc.
But it works ! Spam mails now sorted correctly in the junk folder.

It is wierd it didn’t work with the defaults. Did you modify the flags in dagent.cfg before testing?

Bo

Yes, i changed the dagent.cfg before testing, to let dagent look for “X-Spam-Flag” with YES or NO. Originally there was another Flag in dagent.cfg to look for, but wasn’t found in my mail headers. So I tried this, but won’t work for me.

X-Spam-Status works great

Strange

greets

Thomas

@teka74 said in Spam is not sorted into Junk Folder:

Yes, i changed the dagent.cfg before testing, to let dagent look for “X-Spam-Flag” with YES or NO. Originally there was another Flag in dagent.cfg to look for, but wasn’t found in my mail headers. So I tried this, but won’t work for me.

From what I see the default is:

# The following e-mail header will mark the mail as spam, so the mail
# is placed in the Junk Mail folder, and not the Inbox.
# The name is case insensitive.
# set to empty to not use this detection scheme.
spam_header_name = X-Spam-Status

# If the above header is found, and contains the following value
# the mail will be considered as spam.
# Notes: 
#  - The value is case insensitive.
#  - Leading and trailing spaces are stripped.
#  - The word 'bayes' also contains the word 'yes'.
spam_header_value = Yes,

Which looks pretty much like what you have, except for the “,” but as you see in the headers, it is present.

Puhhh, I think, the original config was right, i tried to look for x-spam-flag …

after 2 weeks working on this server i’m too tired I think.

But now it’s nearly done, a secured server, only ssl/tls access, ssl/dane email transport,

and kopano as backend !

Thanks for help

Thomas

@teka74 said in Spam is not sorted into Junk Folder:

But now it’s nearly done, a secured server, only ssl/tls access, ssl/dane email transport,
and kopano as backend !

Great to hear you are happy about your kopano system! :)

Bo