MailScanner - perl modules missing?

  • Hi,

    I went to use/turn on (again,  was trying policyd for awhile..) Mailscanner today and noticed it had an update,   after the update and re-starting it via the control panel,  it didn't appear to be running.  I logged into the device via CLI and typed:

    /usr/local/etc/rc.d/mailscanner start.

    Which I assumed was a valid way to start Mailscanner (or at least test),  but perhaps it is not and the below is a result of this incorrect start method.

    I was presented with this error:

    [pfw01]/var/log(33): /usr/local/etc/rc.d/mailscanner start
    Starting mailscanner.
    Can't locate Filesys/ in @INC (@INC contains: /usr/local/lib/MailScanner /usr/local/lib/MailScanner /usr/local/lib/perl5/site_perl/5.12.3/mach /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/mach /usr/local/lib/perl5/5.12.3 /usr/local/lib/perl5/5.12.3/BSDPAN) at /usr/local/sbin/mailscanner line 91.
    BEGIN failed–compilation aborted at /usr/local/sbin/mailscanner line 91.
    /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

    I attempted to correct this by installing the module via cpan, but it fails as make (or a compiler i suspect) isn't installed on the system.  Re installing Mailscanner did not correct things for us.

    any idea how to make Mailscanner happy again?


  • during another re-install attempt i grabbed the file "apkg_p5-Filesys-DF…tbz" from /tmp/ and moved it aside.    after the install finished,  mailscanner still will not start.   I went to the tbz file,  uncompressed it and manually moved the bits to where they should be (/usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df).

    things still don't start,  with the same error.

    is it because of the difference in perl?

    perl -v returns 5.13.3,  the module seems to be built agains 5.13.4

    thanks again,

    pfw01]/var/log(126): ls -ltr !$
    ls -ltr /usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df
    total 16
    -r-xr-xr-x  1 root  wheel  14275 Dec 13 16:57
    -r--r--r--  1 root  wheel      0 Dec 13 16:57
    -rw-r--r--  1 root  wheel    238 Dec 13 16:57 .packlist

    perl -v

    This is perl 5, version 12, subversion 3 (v5.12.3)

  • hate replying to my own posts repeatedly… 8)

    fixed it,  i think..  i edited the top of mailscanner (/usr/local/sbin/mailscanner) from:

    #!/usr/bin/perl -U -I/usr/local/lib/MailScanner


    #!/usr/local/bin/perl5.12.4 -U -I/usr/local/lib/MailScanner

    to force it to use the .4 version and not the site perl.

    not sure why i seem to be the only one with this issue tho.  8)...

    take care!

  • Hi,

    This happens because perl modules are installed under perl version dir.

    If you have more then one version of perl on system, you need to remove other perl version and reinstall mailscanner or force mailscanner version just like you did.

    I'll force perl version as well perl install to prevent this error.

    Thanks for your feedback.

  • @marcelloc:

    I'll force perl version as well perl install to prevent this error.
    Thanks for your feedback.

    Hi Marcello,

    Just as an FYI I had to do the same with the spamassassin script (force perl version) as I was getting the same error:
    (477): spamassassin -D –lint
    Can't locate NetAddr/ in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.3/BSDPAN /usr/local/lib/perl5/site_perl/5.12.3/mach /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/mach /usr/local/lib/perl5/5.12.3) at /usr/local/lib/perl5/site_perl/5.12.4/Mail/SpamAssassin/ line 25.

    looks good now,  till I reboot..  not sure how to make these changes stick,  if they don't.

    I didn't want to remove the installed perl as I'm not sure what I'd break if i did (other packages or system dependencies).

    thanks again,

  • what pfsense packages do you have installed?

  • @marcelloc:

    what pfsense packages do you have installed?

    HAVP av
    postfix forwarder
    RRD Summary

    These are not the only packages that were on the system,  i've looked at/installed others then removed them after determining they were not of value to us.

  • LightSquid

    require perl.

    For now, keep file hacks until I have time to test and release a fix forcing perl version.

  • will do.  I'll provide feedback when i see you rev the code.

    take care and thanks,

  • Any update on this ? I beive that many people have the same issue

  • Rebel Alliance Developer Netgate

    Out of curiosity, try running:


    From the shell. See if that helps.

  • Hello everybody!
    I am new in pfsense and I am trying to install mailscanner. I have in the same PF Box (that is a VM) squid, dansguardian, postfix FW. I edit the  /usr/local/sbin/mailscanner and alredy have the right perl version perl5.12.4. But when I try to start mailscanner with /usr/local/etc/rc.d/mailscanner start I have :

    Starting mailscanner.
    Can't load '/usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df/' for module Filesys::Df: /usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df/ Undefined symbol "PL_stack_max" at /usr/local/lib/perl5/5.12.4/mach/ line 200.
     at /usr/local/sbin/mailscanner line 91
    Compilation failed in require at /usr/local/sbin/mailscanner line 91.
    BEGIN failed--compilation aborted at /usr/local/sbin/mailscanner line 91.
    /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

    I think the problem is with this "PL_stack_max" on and search on google but I can´t figure out what is the problem

    I am using :
    2.0.1-RELEASE (amd64)
    mailscanner-dev 4.83.5 pkg v.0.2.1
    postfix forwarder 2.8.7,1 pkg v.2.3.4_1  (starts ok)

    thanks in advance

  • Can you check if these modules were installed on the same dir?

    Can you try a clean install only with postfix +mailscanner?

    If you speak portuguese, take a look on intenational portuguese forum too.

    Marcello Coutinho

  • Hello Marcello (sorry but I saw so many of your posts here that I feel that I konw You, by the way Great Job Man)

    How can I see if modules are in the same dir? (as I say i am new on PFSense and FreeBSD) where this modules are?

    This is a VM tomorrow I can try to create a clean install only with this 2 modules

    Do you install mailscanner on x64 and works OK?

    I speak portuguese but I find this topic and decide to try here. But I will create a topic in Portuguese too!


  • @informatica_cmav:

    Do you install mailscanner on x64 and works OK?

    all my mailscanners are on x64.

  • In a fresh install with just Mailscanner and Postfix Forward works OK


Log in to reply