MailControl Bug.

Discuss the ConfigServer MailScanner Front-End script
7 posts Page 1 of 1
Sergio
Junior Member
Posts: 1333
Joined: 12 Dec 2006, 14:56


Hi, Sarah.
When a search is made in MailControl some times if the REGEX used has some error, MailControl shows the following message
:
MySQL Error: [Got error 'invalid character range' from regexp] [SELECT COUNT(*) FROM maillog WHERE (subject regexp ? )]

and after that there is nothing you can do to return to work, is like the search is not wiped out and continues in memory even if you close MailControl to start it over and the only way is to close the browser in order to start using MailControl again.

Can you check on this? Thanks.

Here is the REGEX I was searching:
[subject] regexp "(ocado|amazon|Walgreens|target|s club|store|from|cvs)[.- ]offer"

There is no error on the REGEX by the way. Or it could be that the [.- ] (3 characters defined) are checked as from . to \s

Regards,
Sergio
Sarah
Moderator
Posts: 787
Joined: 09 Dec 2006, 22:49


When I test your regular expression on regex101.com, there is a pattern error in the regex in the [.- ]. Try defining the characters in your range differently.

I'll report the bug to Jonathan regarding the inability to get back to MailControl if there is an error in your regular expression.
Sergio
Junior Member
Posts: 1333
Joined: 12 Dec 2006, 14:56


Thank you Sarah, for helping with the bug..

Another 2 more things to check if you don't mind.
- Please,check that MailControl forgets (clear) the search box when we enter into MailControl from the main page. As now when a search is done and MailControl is opened once again the old search starts again.

- When a new search is done, the pagination should return to page. 1 (one).
Example, make a search and go to page 3, then do a new search and you will be in page 3 and if the new search only has 1 page it seems that the search was empty.

Regarding the REGEX pattern, I have a lot of SpamAssassin rules with that regex pattern working without any issues. I tested the pattern declares with REGEXPAL and it detects the characters set; so, I assume that in MailControl the search REGEX box can't use that and I am using the escaped version like this \-?\.?\_? ? and is working for what I want.

Have a nice day.

Regards,
Sergio
ForumAdmin
Moderator
Posts: 1294
Joined: 01 Oct 2008, 09:24


31 Jul 2017, 15:01Sergio wrote:
- Please,check that MailControl forgets (clear) the search box when we enter into MailControl from the main page. As now when a search is done and MailControl is opened once again the old search starts again.
This is by design and will remain this way.
31 Jul 2017, 15:01Sergio wrote:
- When a new search is done, the pagination should return to page. 1 (one).
We will fix this in the next release.
31 Jul 2017, 15:01Sergio wrote:
Regarding the REGEX pattern, I have a lot of SpamAssassin rules with that regex pattern working without any issues. I tested the pattern declares with REGEXPAL and it detects the characters set; so, I assume that in MailControl the search REGEX box can't use that and I am using the escaped version like this \-?\.?\_? ? and is working for what I want.
You must escape the non-alphanumerics within the square brackets otherwise they are mistaken by the MySQL regex handler as a range selection (-), so use:
Code: Select all
(ocado|amazon|Walgreens|target|s club|store|from|cvs)[\.\-\s]offer
Sergio
Junior Member
Posts: 1333
Joined: 12 Dec 2006, 14:56


31 Jul 2017, 16:21ForumAdmin wrote:
31 Jul 2017, 15:01Sergio wrote:
- Please,check that MailControl forgets (clear) the search box when we enter into MailControl from the main page. As now when a search is done and MailControl is opened once again the old search starts again.
This is by design and will remain this way.
Ok, got it. Some times the search is extensive and it needs to be stopped and started with a different search, so, I will have to close WHM in order to make the new search.
31 Jul 2017, 16:21ForumAdmin wrote:
31 Jul 2017, 15:01Sergio wrote:
- When a new search is done, the pagination should return to page. 1 (one).
We will fix this in the next release.
Thank you!!
31 Jul 2017, 16:21ForumAdmin wrote:
31 Jul 2017, 15:01Sergio wrote:
Regarding the REGEX pattern, I have a lot of SpamAssassin rules with that regex pattern working without any issues. I tested the pattern declares with REGEXPAL and it detects the characters set; so, I assume that in MailControl the search REGEX box can't use that and I am using the escaped version like this \-?\.?\_? ? and is working for what I want.
You must escape the non-alphanumerics within the square brackets otherwise they are mistaken by the MySQL regex handler as a range selection (-), so use:
Code: Select all
(ocado|amazon|Walgreens|target|s club|store|from|cvs)[\.\-\s]offer
Great, I will do that next time, appreciated.

Best Regards,
Sergio
ForumAdmin
Moderator
Posts: 1294
Joined: 01 Oct 2008, 09:24


MSFE v8.10 has been released to help with this issue:
https://blog.configserver.com/
Sergio
Junior Member
Posts: 1333
Joined: 12 Dec 2006, 14:56


Nice!!
Thank you for this, it will reduce a lot of time when using MailControl.

Regards,
Sergio
7 posts Page 1 of 1