Jump to content

Email Routing Rule Assistance Please


SJEaton

Recommended Posts

Hi

I have set up what I thought was a very simple email routing rule requirement on our environmentalhealth@ mailbox whereby emails received from a noreply@ email address are moved into a folder called NO REPLY. This wasn't working and on investigation we found that when these emails come in the address is displayed as From: Waltham Forest Council <noreply@walthamforest.gov.uk>  so I also set up a routing rule to move any emails received from Waltham Forest Council thinking this might be the issue (so I now have 2 routing rules see attached). 

Unfortunately this morning, another email was received in the mailbox from Waltham Forest Council <noreply@walthamforest.gov.uk> and the routing rule still didn't work so I'm baffled now.  It's probably something really silly but I'd appreciated some assistance to get this working, thanks

Sam

 

Capture1.PNG

Capture2.PNG

Link to comment
Share on other sites

1 minute ago, Martyn Houghton said:

It could be that you LIKE statement is looking for additional characters before and after

@Martyn Houghton - not really... LIKE does not care if there are or if there are not any characters before or after the value... the LIKE operator is the equivalent of "Contains" and is a "soft " match meaning it can either contain the text or it can simply be the text. More simply put, as long as the text/value is in there in any form, then is ok...

@SJEaton - let's start with something simple: a) do you have autoresponder enabled and b) rule order/precedence... can you confirm the email is not being picked up by another rule that has higher precedence (higher in the order list) than these two?

Link to comment
Share on other sites

@Victor

This issue and another one regarding a mailbox rule has prompted me to review the rules we have set up on our instance.  The attached shows the list of rules, with the coding used and the mailbox destination where applicable.  I've hi-lighted in yellow a few cases where I wonder if the coding is correct or where rules might possibly be amalgamated.

If we have autoresponder enabled, I'm not aware of it

I can't see any issues with rule order/precedence

H routing rules.xlsx

Link to comment
Share on other sites

@Stuart Torres-Catmur - so at a quick glance: rules 4-11, 13-15, 24, 25, 31 and 32 ... all the "Your News only" rules... they are redundant... I am not sure why you have a rule for each mailbox? Anyway, because these rules all have the same expression, in reality, only rule 3 will get action because that's the first rule in the list that will match the expression that all these rules actually have. So, you don't need: 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 24, 25, 31, 32.

And yes, you do need the first rule, I think Sam can explain why, it was explained when we discussed an issue in PM, not sure if I still have that conversation...

I'll keep looking...

Link to comment
Share on other sites

I'm inspired on setting a few rules our end also..

 

Our users usually reply back to the Service Desk mailbox to update a call - can we arrange a rule for all calls to be updated automatically?

All replies back to the Service Desk contain the reference number of the call logged - example is as below:

Re: New IT Incident ( IN00039743 )

 

What rule parameter would one use - subject? also what would the rule expression be?

 

Your assistance would be greatly appreciated.

 

Regards

Sxx

 

Link to comment
Share on other sites

@Shamaila.Yousaf - to have an email applied to an existing request automatically, you can use a rule having this expression: REGEX_MATCH(subject, '.*\b[a-zA-Z]{2}[0-9]{8}\b.*'). There is more information about this and more examples on our wiki here: https://wiki.hornbill.com/index.php/Email_Routing_Rules

Also, there is an FAQ explaining all scenarios where the rule might fail to apply an email to a request, I would suggest reading it so you know how this works and, more importantly, why it might not:  

 

  • Like 1
Link to comment
Share on other sites

Hi  @Victor, I do have an example of a no-reply that wasn't picked up..  How do you want me to send this to you?? 

Its currently sitting in the environmentalhealth@mailbox, it came in 21/01/2019 at 15:57 - titled WF Housing Estate Booking Received (REQ103183799-1).  I can't promise it will stay there too long as this is an active mailbox and someone might get rid of it.

Sam 

Link to comment
Share on other sites

@SJEaton -  I can tell you straight away why these two emails are not processed by the "no-reply" rule, is because they are being picked up by the "Update Call" rule. The expression you have for the "Update Call" rule (REGEX_MATCH(subject, '.*[a-zA-Z]{2}[0-9]{8}.*') is matching the highlighted text from the email subject:

  • WF Housing Estate Booking Received (REQ103183799-1)
  • Report a housing issue ref. HS10301235

What you need in the "Update Call" rule, in the expression is to look for that pattern ([a-zA-Z]{2}[0-9]{8}) to be matched fully in a single word, rather than be matched as part of a larger text (string) as it is now. Because having it like this will match like in the above and will process emails that are not actually meant to be processed by this rule. To have this type of matching, as a separate word, please amend the rule expression for "Update Call" to this one: REGEX_MATCH(subject, '.*\b[a-zA-Z]{2}[0-9]{8}\b.*') . This is what I also advised Shamaila above and also what is recommended to use on our wiki documentation.

Link to comment
Share on other sites

Thanks @Victor

Yes @SJEaton I'll arrange to make the regex change probably first thing tomorrow morning.

Victor, in respect of the 'delete Your News' rules, each one applies to an individual mailbox as the Your New bulletin is sent to everyone, so needs to be deleted from each of these mailboxes.  Is there a way to have just one rule that applies to this mail item for all mailboxes?

 

Also  the code [subject LIKE '%Automatic reply: E-Mails On Hold for%' or subject LIKE '%Undeliverable: E-Mails On Hold for%'] doesn't seem to work.  I note that Sam has done individual rules for various email types received to be pushed into a single folder, rather than incorporating multiple mail criteria into one rule.  Is the OR statement not supported?

Link to comment
Share on other sites

Just now, Stuart Torres-Catmur said:

in respect of the 'delete Your News' rules, each one applies to an individual mailbox as the Your New bulletin is sent to everyone, so needs to be deleted from each of these mailboxes

@Stuart Torres-Catmur - erm... not really... I think I explained to someone else recently (I'll try and find the thread)... when an email arrives in Hornbill, the mail engine simply has no concept of mailbox... so an incoming email is just simply this, an incoming email, there is no "incoming email per mailbox"... now the routing rules can do various things depending on the sender and recipient... but this is when a routing rule starts to process that email which already arrived in Hornbill...

Moreover, as you said you do have a "Your News" email sent to each of the emails addresses configured on your mailboxes. But the rules I mentioned above, have the same expression... so, you see, only the rule on top will process these emails, none of the rules below will even have a chance to process it because all email, all of them having "Your News" will be processed by that first rule... this is why I said that rule 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 24, 25, 31, 32 are superfluous and will never get triggered because simply they share the same expression as rule 3 (as I said the rule does not have a concept of a mailbox when evaluating the expression, unless you specify this in the expression). Now, if you really want to differentiate them and have the "Your News" processed differently depending on who the recipient is then you need to reflect this in the rule expression...

10 minutes ago, Stuart Torres-Catmur said:

[subject LIKE '%Automatic reply: E-Mails On Hold for%' or subject LIKE '%Undeliverable: E-Mails On Hold for%'] doesn't seem to work

Again, I would need an example of an email that failed to be processed by this rule to advise why it did not work...

11 minutes ago, Stuart Torres-Catmur said:

Is the OR statement not supported?

Any operator that is valid in an SQL statement (such as OR) will be valid in a routing rule expression.

Link to comment
Share on other sites

Thanks @Victor

I understand the Your News explanation and have now removed all the unnecessary ones.  It was tedious setting them all up and I did think 'surely this shouldn't be necessary...'

I'll get an example of an email not grabbed by the rule [subject LIKE '%Automatic reply: E-Mails On Hold for%' or subject LIKE '%Undeliverable: E-Mails On Hold for%'] for you tomorrow.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...