1

Topic: Error in regex

Every day I am getting error messages in my postmaster mailbox with the following error:

Subject: Cron <amavis@mail>  test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-clean
Msg Body:
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 923.


==== Required information ====
- iRedMail version: 0.9.7 MySQL Edition
- Linux/BSD distribution name and version: Linux mail 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): Apache2
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Error in regex

Does anyone have any idea why this is happening?

3

Re: Error in regex

It's likely a SpamAssassin programming issue/bug. Try google.

4

Re: Error in regex

Here's the fix:

In /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 923

change

  $str =~ s/^(.{,200}).*$/$1/gs;

to

  $str =~ s/^(.{0,200}).*$/$1/gs;

5

Re: Error in regex

Thanks for sharing. smile