Error with configuration

Mark Sapiro mark at
Mon Oct 9 20:55:14 UTC 2017

On 10/09/2017 01:22 PM, Juan Pablo Lorier wrote:
> Hi,
> I've installed MailScanner 5.0.3-7 on centos 7.
> Though I've installed opt-perl-522-Encoding-FixLatin.noarch I still get
> a complaint about the lack of the perl module:
> Could not use Custom Function code
> /usr/share/MailScanner/perl/custom/, it could not be
> "require"d. Make sure the last line is "1;" and the module is correct with
>  perl -wc (Error: Can't locate Encoding/ in @INC

> (@INC
> contains: /usr/sbin /usr/sbin/MailScanner /usr/share/MailScanner/perl 
> /usr/share/MailScanner/perl /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5
> /usr/share/perl5)

Encoding/ needs to be in one of the above directories or you
can modify the /usr/lib/MailScanner/init/ms-init script to include

export PERL5LIB=path

where path it the path of the directory containing Encoding/

 at /usr/share/MailScanner/perl/custom/
> line 43.
>  BEGIN failed--compilation aborted at
> /usr/share/MailScanner/perl/custom/ line 43.
>  Compilation failed in require at
> /usr/share/MailScanner/perl/custom/ line 61.
> Compilation failed in require at
> /usr/share/MailScanner/perl/MailScanner/ line 752.

Apparently this is really a MailWatch question. Their list is at

> Where do I set the path to search the modules? I've tried placing the
> module in mailscanner perl custom directory but still complaints.

/usr/share/MailScanner/perl/custom/ is not in @INC. You could put it in
/usr/share/MailScanner/perl/ which is in @INC

Mark Sapiro <mark at>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the MailScanner mailing list