HMS and the message counter with the spam

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

HMS and the message counter with the spam

Post by 00_00 » 2016-12-16 20:38

I have installed hmailserver + MS SQL server + roundcube + spamassassin (Jam software).
In my hmailserver is not running the message counter with the spam. Counter spam = 0.
Letters are marked *****Spam***** In the subject, but not filtered in folder Spam (are not transferred to the spam folder).
What to do to began to count on the meter and and letters began to filter out.?
How do I teach spamassassin to mark the necessary letters as spam? In Roundcube if I open the email and click this is not spam, the following letter comes the same again marked as spam. Spamassassin not learning.

Please help me!

User avatar
SorenR
Senior user
Senior user
Posts: 4199
Joined: 2006-08-21 15:38
Location: Denmark

Re: HMS and the message counter with the spam

Post by SorenR » 2016-12-16 20:48

00_00 wrote:I have installed hmailserver + MS SQL server + roundcube + spamassassin (Jam software).
In my hmailserver is not running the message counter with the spam. Counter spam = 0.
Letters are marked *****Spam***** In the subject, but not filtered in folder Spam (are not transferred to the spam folder).
What to do to began to count on the meter and and letters began to filter out.?
How do I teach spamassassin to mark the necessary letters as spam? In Roundcube if I open the email and click this is not spam, the following letter comes the same again marked as spam. Spamassassin not learning.

Please help me!
There are plenty of guides here on how to train your SpamAssassin, use the search function.

Roundcube questions should be asked here: http://www.roundcubeforum.net/
SørenR.

Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-16 21:03

00_00 wrote:I have installed hmailserver + MS SQL server + roundcube + spamassassin (Jam software).
In my hmailserver is not running the message counter with the spam. Counter spam = 0.
Letters are marked *****Spam***** In the subject, but not filtered in folder Spam (are not transferred to the spam folder).
What to do to began to count on the meter and and letters began to filter out.?
How do I teach spamassassin to mark the necessary letters as spam? In Roundcube if I open the email and click this is not spam, the following letter comes the same again marked as spam. Spamassassin not learning.

Please help me!
Depends what is marking it as "***SPAM***".

My guess is that it is your spamassassin marking it as such and not Hmailserver. Hmailserver will only count it as spam if the hmailserver spam score hits the hmailserver score threshold (settings - antispam - general). This is nothing to do with the spamassassin score unless you have specifically told it to use spamassassin score in the settings - antispam - spamassassin tab.

Also, what procedure/rule do you have in place to move a message to a spam folder? It doesnt do it by itself - you have to tell it to do so (by email client or rule/script).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-16 21:04

Then at least help me understand why counter spam does not work in hmailserver?

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-16 21:09

Anti Spam settings in HMS:

TAB 1
  • Spam Mark Threshold = 5
    Spam Delete Threshold = 8
    Tick all "Add.." boxes, and mark subject "[SPAM]"
TAB 2
  • Tick the first 3 options:
    'Use SPF', 'Check HELO', 'Check DNS-MX records' and score them 3, 2, 2, respectively
TAB 3
  • Use Spamassassin = Yes
    tick "Use SA score"
    Score = 5
OR

you can see my personal setup here: viewtopic.php?f=21&t=28133 (second post)
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-16 21:21

I have now so. Corrected as you wrote.
Attachments
spamtest.jpg
spamtest.jpg (20.24 KiB) Viewed 6084 times
spamassassin.jpg
spamassassin.jpg (15.18 KiB) Viewed 6084 times
general.jpg
general.jpg (22.3 KiB) Viewed 6084 times

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-16 21:27

jimimaseye wrote: Also, what procedure/rule do you have in place to move a message to a spam folder? It doesnt do it by itself - you have to tell it to do so (by email client or rule/script).
That is, I need to create a global rule that if the subject ***Spam***, then carry that letter in your Spam folder? Then, in what folder of Spam is to wrap the letter in a folder for each user?

User avatar
mattg
Moderator
Moderator
Posts: 21268
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: HMS and the message counter with the spam

Post by mattg » 2016-12-17 00:16

You last image shows that you aren't modifying the subject in hMailserver by the way...
00_00 wrote:That is, I need to create a global rule that if the subject ***Spam***, then carry that letter in your Spam folder? Then, in what folder of Spam is to wrap the letter in a folder for each user?
If you say move to folder 'Spam' then these mail will be moved to a folder of that name, and the folder should be created if it doesn't already exist
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-17 00:30

00_00 wrote:I have now so. Corrected as you wrote......
I personally think that a spam MARK threshold of 1 with this scoring is too low. Just any single check failure will result in being marked as spam as it stands. (And there is always chance that genuine mail will fail spf.)

I would make it at least 5 making it requiring at least 2 positive internal check matches or a SpamAssassin match.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-19 08:32

mattg wrote:You last image shows that you aren't modifying the subject in hMailserver by the way...
If you say move to folder 'Spam' then these mail will be moved to a folder of that name, and the folder should be created if it doesn't already exist
I have spamassassin settings tags ****Spam****. There is a difference who marks hamilserver or Spamassassin?

How to create and configure move to the spam folder?
It is necessary IMAP folder, global for all to create?

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-19 11:20

00_00 wrote: How to create and configure move to the spam folder?
It is necessary IMAP folder, global for all to create?

Set a GLOBAL RULE:

if:
X-Spam-Flag (custom header) ...contains..... YES

action:
Move to IMAP Folder.....

(the above will move based on SPAMASSASSIN spam scoring, or you can use X-hMailServer-Spam if you want to move based on Hmailserver spam mark).

The folder will be created automatically if it doesnt already exist. (Remember, in the email client IMAP folders will have to be refreshed and the folder subscribed to to see it once it is created).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-19 11:36

jimimaseye wrote: Set a GLOBAL RULE:

if:
X-Spam-Flag (custom header) ...contains..... YES

action:
Move to IMAP Folder.....

(the above will move based on SPAMASSASSIN spam scoring, or you can use X-hMailServer-Spam if you want to move based on Hmailserver spam mark).

The folder will be created automatically if it doesnt already exist. (Remember, in the email client IMAP folders will have to be refreshed and the folder subscribed to to see it once it is created).
Well. Try to create the rule as you wrote and see what will happen.

Maybe a stupid question to ask, but still. The letters will be moved to the spam folder in each mailbox or not? That is, a global rule fulfills each mailbox and for each creates his spam folder?
I just don't understand it.

Thx.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-19 11:44

Yes it will move to an individual spam folder for EACH account it is destined.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-19 13:35

jimimaseye wrote:Yes it will move to an individual spam folder for EACH account it is destined.
When I create a rule IMAP folder, how to specify "Spam" or "Junk"? Or is there no difference?

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-19 14:41

00_00 wrote: When I create a rule IMAP folder, how to specify "Spam" or "Junk"? Or is there no difference?
Call it what you like! It will create it if it doesnt exist. If you already have a spam folder created for some accounts then use that.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-19 15:31

jimimaseye wrote: Call it what you like! It will create it if it doesnt exist. If you already have a spam folder created for some accounts then use that.
Created the rule. Restarted hmailserver and spamassassin. Waited for the first letter of spam. In the logs of hmailserver writes that the rule applied, but the letter is still marked as spam was in the Inbox. What's wrong?
And counter spam did not consider this email spam.
Attachments
action.jpg
criteria.jpg
rule.jpg

User avatar
jimimaseye
Moderator
Moderator
Posts: 8917
Joined: 2011-09-08 17:48

Re: HMS and the message counter with the spam

Post by jimimaseye » 2016-12-19 15:54

Try actioning the way that I said.

Why are you checking in a rule for

X-Hmailserver-spam' contains "***SPAM***' ?

And I cant comment on your spam counter because you havent said what youre settings are at. (Earlier in the thread you had them all wrong and it wss then explained to you on how to resolve it).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

00_00
New user
New user
Posts: 14
Joined: 2016-12-16 20:07

Re: HMS and the message counter with the spam

Post by 00_00 » 2016-12-19 16:33

jimimaseye wrote:Try actioning the way that I said.

Why are you checking in a rule for

X-Hmailserver-spam' contains "***SPAM***' ?

And I cant comment on your spam counter because you havent said what youre settings are at. (Earlier in the thread you had them all wrong and it wss then explained to you on how to resolve it).
Sorry! I blunt. It's headers. Did so. Wait till tomorrow and see what happens.

Criteria -> Custom header field: 'X-hMailServer-Spam' Equals: 'YES'
Action -> Move to IMAP folder -> Junk

Post Reply