The pfSense Store

Author Topic: Mailscanner UNOFFICIAL package for pfSense 2.3.x  (Read 2580 times)

0 Members and 1 Guest are viewing this topic.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Mailscanner UNOFFICIAL package for pfSense 2.3.x
« on: March 28, 2017, 12:44:56 pm »
Hi everybody.

Here are install instructions for UNOFFICIAL mailscanner package for pfSense(R) software 2.3.x


Under console/ssh, fetch the install script, check what it does if you want and then execute it.

Code: [Select]
cd /root
fetch https://raw.githubusercontent.com/marcelloc/Unofficial-pfSense-packages/master/pkg-mailscanner/files/install_mailscanner_23.sh
sh ./install_mailscanner_23.sh

Once you install, some cpan modules will be still missing . I consider they important to spamassassin to work properly but to install it on freebsd or pfSense, you will need gcc and other compile stuff installed.

Code: [Select]
Mar 28 17:15:48.929 [92279] dbg: diag: [...] module not installed: Digest::SHA1 ('require' failed)
Mar 28 17:15:48.929 [92279] dbg: diag: [...] module not installed: Geo::IP ('require' failed)
Mar 28 17:15:48.929 [92279] dbg: diag: [...] module not installed: Net::CIDR::Lite ('require' failed)
Mar 28 17:15:48.930 [92279] dbg: diag: [...] module not installed: Razor2::Client::Agent ('require' failed)
Mar 28 17:15:48.931 [92279] dbg: diag: [...] module not installed: LWP::UserAgent ('require' failed)
Mar 28 17:15:48.931 [92279] dbg: diag: [...] module not installed: Net::Patricia ('require' failed)

If you decide to complete spamassassin features, run this second script to pfSense be able to compile cpan modules.

Code: [Select]
cd /root
fetch https://raw.githubusercontent.com/marcelloc/Unofficial-pfSense-packages/master/pkg-mailscanner/files/install_cpan_modules_23.sh
sh ./install_cpan_modules_23.sh


Once it finishes, all must be in place. If you do not see the menu after it finishes, try to install any pfSense package from GUI, like cron for example.


*WARNING*

Use it at your own risk.

This script install packages from freebsd and change your config file.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #1 on: April 16, 2017, 10:05:56 pm »
I've include 7zip, rar and PDFID patch to mailscanner package, just re-run  install to get latest updates.

Thanks for  Bismarck and danny at tweegy.nl

Offline danjeman

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #2 on: April 17, 2017, 10:35:39 am »
Sorry posted in postfix antispam thread by mistake...

Updated but now have two 'Mailscanner' services menu items.. Looks like check_mailscanner_service.php is looking for menu item 'mailscanner' not 'Mailscanner'...


Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #3 on: April 17, 2017, 11:01:40 am »
Sorry posted in postfix antispam thread by mistake...

Updated but now have two 'Mailscanner' services menu items.. Looks like check_mailscanner_service.php is looking for menu item 'mailscanner' not 'Mailscanner'...

Thanks, I'll fix it.

Offline poteh

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #4 on: May 05, 2017, 04:50:58 am »
Thank for your job, marcelloc!

Installed mailscanner with your script and installed cpan modules after that on fresh system.
Try to check spamassasin in shell with GTUBE
Quote
spamassassin -t < test.txt > spam.out
Got:
Quote
plugin: failed to parse plugin /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm: Can't locate /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm in @INC (you may need to install the ::usr::local::etc::mail::spamassassin::DecodeShortURLs module) (@INC contains: /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/site_perl/mach/5.24 /usr/local/lib/perl5/5.24/mach /usr/local/lib/perl5/5.24) at /usr/local/lib/perl5/site_perl/Mail/SpamAssassin/PluginHandler.pm line 109.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #5 on: May 05, 2017, 04:56:05 am »
Does spamassassin --lint gets the same result?

Offline poteh

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #6 on: May 05, 2017, 05:49:01 am »
Yep, the same result
Quote
May  5 13:46:22.245 [32795] warn: plugin: failed to parse plugin /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm: Can't locate /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm in @INC (you may need to install the ::usr::local::etc::mail::spamassassin::DecodeShortURLs module) (@INC contains: lib /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/site_perl/mach/5.24 /usr/local/lib/perl5/5.24/mach /usr/local/lib/perl5/5.24) at /usr/local/lib/perl5/site_perl/Mail/SpamAssassin/PluginHandler.pm line 109, <DATA> line 717.

Offline Bismarck

  • Full Member
  • ***
  • Posts: 120
  • Karma: +21/-1
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #7 on: May 05, 2017, 06:12:19 am »
Yep, the same result
Quote
May  5 13:46:22.245 [32795] warn: plugin: failed to parse plugin /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm: Can't locate /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm in @INC (you may need to install the ::usr::local::etc::mail::spamassassin::DecodeShortURLs module) (@INC contains: lib /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/site_perl/mach/5.24 /usr/local/lib/perl5/5.24/mach /usr/local/lib/perl5/5.24) at /usr/local/lib/perl5/site_perl/Mail/SpamAssassin/PluginHandler.pm line 109, <DATA> line 717.

Try:

Code: [Select]
fetch -q -o  /var/db/spamassassin/3.004001/DecodeShortURLs.pm https://raw.githubusercontent.com/smfreegard/DecodeShortURLs/master/DecodeShortURLs.pm
or

Code: [Select]
fetch -q -o  /usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm https://raw.githubusercontent.com/smfreegard/DecodeShortURLs/master/DecodeShortURLs.pm
both will work.
« Last Edit: May 05, 2017, 10:27:24 am by Bismarck »

Offline poteh

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #8 on: May 05, 2017, 07:09:53 am »
still no result :( the same error

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #9 on: May 05, 2017, 07:23:40 am »
Code: [Select]
#install shorturl mailscanner plugin
plugin_file=DecodeShortURLs.zip
fetch -o $plugin_file https://github.com/smfreegard/DecodeShortURLs/archive/master.zip
unzip -o $plugin_file
cp DecodeShortURLs-master/*pm $plugin_dir/plugins/
cp DecodeShortURLs-master/*cf $plugin_dir

The install script looks ok for me. I'll test on a new install.

Offline Bismarck

  • Full Member
  • ***
  • Posts: 120
  • Karma: +21/-1
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #10 on: May 05, 2017, 10:20:33 am »
DecodeShortURLs.pm need to be side by side with DecodeShortURLs.cf or in spamassassin perl folder, like:

Quote
/var/db/spamassassin/3.004001/DecodeShortURLs.pm

Quote
/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm

Quote
cp DecodeShortURLs-master/*pm $plugin_dir/plugins/

will not work, because its:

Quote
/var/db/spamassassin/3.004001/plugins/DecodeShortURLs.pm

and DecodeShortURLs.cf is looking for:

Quote
loadplugin Mail::SpamAssassin::Plugin::DecodeShortURLs DecodeShortURLs.pm

ifplugin Mail::SpamAssassin::Plugin::DecodeShortURLs

...

Its looking for Mail::SpamAssassin::Plugin::DecodeShortURLs or DecodeShortURLs.pm, both should work.

Code: [Select]
spamassassin -D --lint
...
May  5 17:31:19.423 [46111] dbg: config: fixed relative path: /var/db/spamassassin/3.004001/DecodeShortURLs.pm
May  5 17:31:19.424 [46111] dbg: plugin: loading Mail::SpamAssassin::Plugin::DecodeShortURLs from /var/db/spamassassin/3.004001/DecodeShortURLs.pm
...
« Last Edit: May 05, 2017, 10:33:25 am by Bismarck »

Offline poteh

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #11 on: May 05, 2017, 11:50:34 am »
DecodeShortURLs.pm need to be side by side with DecodeShortURLs.cf

So I copied DecodeShortURLs.pm from /usr/local/etc/mail/spamassassin/plugins/ to /usr/local/etc/mail/spamassassin/ and now it's working!
thank you guys for your help!

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #12 on: May 05, 2017, 12:29:36 pm »
DecodeShortURLs.pm need to be side by side with DecodeShortURLs.cf


fixed on install script.

https://github.com/marcelloc/Unofficial-pfSense-packages/commit/05e1b73d6b67411b1e6076b6a9c97ee5e3fbc956

Thanks for the feedback.

Offline mbassan

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #13 on: June 13, 2017, 06:50:59 am »
Hello guys,
I have a problem: clamd don't want to start. I tried several times but without any appreciated result.
Any suggestions ?




Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13408
  • Karma: +592/-7
    • View Profile
Re: Mailscanner UNOFFICIAL package for pfSense 2.3.x
« Reply #14 on: June 13, 2017, 07:29:00 am »
Try on console to execute freshclam