The pfSense Store

Author Topic: MailScanner - perl modules missing?  (Read 4738 times)

0 Members and 1 Guest are viewing this topic.

Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
MailScanner - perl modules missing?
« on: January 16, 2012, 01:21:24 pm »
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/Df.pm 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?

thanks,
greg
 ;)
« Last Edit: January 16, 2012, 01:28:19 pm by gwhynott »

Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #1 on: January 16, 2012, 01:40:22 pm »
 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,
-g



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 Df.so
-r--r--r--  1 root  wheel      0 Dec 13 16:57 Df.bs
-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)
« Last Edit: January 16, 2012, 01:42:24 pm by gwhynott »

Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #2 on: January 16, 2012, 02:08:32 pm »
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

to:

#!/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!
greg



Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #3 on: January 16, 2012, 04:31:50 pm »
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.

Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #4 on: January 17, 2012, 09:45:50 am »
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/IP.pm 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/NetSet.pm 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,
-g


« Last Edit: January 17, 2012, 09:47:52 am by gwhynott »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #5 on: January 17, 2012, 10:15:26 am »
what pfsense packages do you have installed?

Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #6 on: January 17, 2012, 01:31:55 pm »
what pfsense packages do you have installed?

HAVP av
LightSquid
mailreport
mailscanner-dev
mtr-nox11
pfblocker
postfix forwarder
RRD Summary
Squid3

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.


Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #7 on: January 17, 2012, 01:48:32 pm »
LightSquid
mailscanner-dev
Squid3

require perl.

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


Offline gwhynott

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #8 on: January 17, 2012, 01:53:09 pm »
will do.   I'll provide feedback when i see you rev the code.

take care and thanks,
greg

Offline tritron

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #9 on: March 17, 2012, 10:33:07 pm »
Any update on this ? I beive that many people have the same issue

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14998
  • Karma: +4/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #10 on: March 21, 2012, 10:06:05 am »
Out of curiosity, try running:
Code: [Select]
perl-after-upgrade
From the shell. See if that helps.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline informatica_cmav

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #11 on: July 11, 2012, 11:46:20 am »
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 :

Code: [Select]
Starting mailscanner.
Can't load '/usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df/Df.so' for module Filesys::Df: /usr/local/lib/perl5/site_perl/5.12.4/mach/auto/Filesys/Df/Df.so: Undefined symbol "PL_stack_max" at /usr/local/lib/perl5/5.12.4/mach/DynaLoader.pm 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 DynaLoader.pm 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

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #12 on: July 11, 2012, 12:00:53 pm »
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.

att,
Marcello Coutinho

Offline informatica_cmav

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #13 on: July 11, 2012, 12:26:44 pm »
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!


Thanks
Guilherme

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: MailScanner - perl modules missing?
« Reply #14 on: July 11, 2012, 01:32:44 pm »
Do you install mailscanner on x64 and works OK?

all my mailscanners are on x64.