Rules not processing

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
joedr3dd
New user
New user
Posts: 2
Joined: 2016-07-25 11:13

Rules not processing

Post by joedr3dd » 2016-07-25 13:12

Hi guys

I am trying to forward any emails with a tag of [SPAM] to another local email account. i have checked hmailserver_date.log and i cant see the rule processing, is this the right place to look for logging on rules. i have attached a screenshot of my rule setup

Thanks in advance
Attachments
hmailrules.png

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

Re: Rules not processing

Post by jimimaseye » 2016-07-25 13:29

Hi
joedr3dd wrote: i have checked hmailserver_date.log and i cant see the rule processing, is this the right place to look for logging on rules.
You need to have DEBUG logging to see the 'applying rules' entries

eg
"DEBUG" 18148 "2016-07-08 08:47:19.561" "Applying rules"
"DEBUG" 18148 "2016-07-08 08:47:19.563" "Applying rule SPAMmove"
"DEBUG" 18148 "2016-07-08 08:47:19.588" "Performing rule action"
Regarding the rule: I would move the FORWARD action up to be the first action. And regarding the 'move to imap folder', is the folder in the same account? (It must be to work - you cant move to folders in to a different account) and does the folder actually exist?
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 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

joedr3dd
New user
New user
Posts: 2
Joined: 2016-07-25 11:13

Re: Rules not processing

Post by joedr3dd » 2016-07-25 13:47

Hi

Thanks for the quick reply i have moved the forward rule around, the rule is a global rule trying to forward to a valid domain that exists in hmail (not a account rule)

The mailbox that it should forward to does not have a spam folder at the moment as i assumed it would be created by hmail

I just sent a test message to a valid email account on hmail and debuging was truned on the email Subjetc had [SPAM] as a test but all i see is SMTPD in the logs?

Cheers

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

Re: Rules not processing

Post by SorenR » 2016-07-25 13:58

joedr3dd wrote:Hi guys

I am trying to forward any emails with a tag of [SPAM] to another local email account. i have checked hmailserver_date.log and i cant see the rule processing, is this the right place to look for logging on rules. i have attached a screenshot of my rule setup

Thanks in advance
Skip checking the subject, X-HmailServer-Spam = YES is enough... And... Forward before move...

EDIT... Saw you already got the advice...

Global rules are a bit tricky... They are not all performed "globally" (as in before delivery to account) ;-) Some of them are executed as account rules even they are defined globally ... :mrgreen:

Move and forward are some of the actions that are done "account level wise".
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Rules not processing

Post by percepts » 2016-07-25 15:48

Ahem....

your test for X-hMailServer-LoopCount is wrong. It should be:


X-hMailServer-LoopCount / Less than / 1

and NOT

X-hMailServer-LoopCount / Equals / <1

it would never match as it is now.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Rules not processing

Post by percepts » 2016-07-25 16:55

https://www.hmailserver.com/documentati ... rence_rule
Rule Actions:
•Move to IMAP folder - Move the message to a specific IMAP folder. This only applies when the delivery is local. If the folder does not already exist, it is created.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Rules not processing

Post by percepts » 2016-07-25 17:50

Also which folder are you trying to move to, a Public folder or an Account folder?

You should check both your account folders and public folders.

Sometimes, it may have created a new account folder which is not one that your email client knows the name of. You can see account folders in your account settings advanced tab and edit folders to check the folders you have and then make sure sure email client is re-synced so that you can see the folders.
I don't think Public Folders would be created/synced automatically so you may have to set that up manually in your email client. Not too sure about that.

Also be aware that an hmail auto created folder name may be different than the folder names your email client defaults to and different email clients may use different default names to each other. Some may use "Junk" and some may use "Spam" for the same thing.
I don't use IMAP becasue I simply don't need it, but many people do. When I tested it, I found it better to manually soecify folder names rather than rely on email client defaults because different clients use different defaults and you never know which cleint will use at any time.
Having said that, becasue I was testing and using several different clients (some very old) I was asking for trouble that current clients shouldn't give.

Post Reply