Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Mailscanner + spamassassin + clamav package

    Scheduled Pinned Locked Moved pfSense Packages
    313 Posts 54 Posters 285.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      Unubtanium
      last edited by

      @mschiek01:

      The package works great once you get it set up.

      Marcelloc helped me a lot. Just trying to return the favor.

      Just any FYI.  If you are going to use active directory to extract your valid recipients.  You need to make sure you install p5-perl-ldap.

      Your help is highly appreciated, and if i can help any1 i will do the same. ITs what it is all about. Love sharing knowledge.
      Thanks for heads up on the ldap. This will be something  i will be using on a late time when i have get enough know how on this packages.

      1 Reply Last reply Reply Quote 0
      • U
        Unubtanium
        last edited by

        @capitangiaco:

        Cannot lock /var/spool/MailScanner/incoming/Locks/clamavBusy.lock, No such file or directory
        chown -R postfix /var/spool/MailScanner/incoming/Locks.

        Hi marcelloc

        Just to let you know that i also did get this error too and had to run the chown command to fix it.

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          @Unubtanium:

          Just to let you know that i also did get this error too and had to run the chown command to fix it.

          ok, I'll check it.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • M
            mschiek01
            last edited by

            Marcelloc-

            I see this error in the log when ever Mailscanner starts:

            Jul 31 07:58:13  MailScanner[30780]: MailScanner E-Mail Virus Scanner version 4.83.5 starting…
            Jul 31 07:58:13  MailScanner[30780]: Reading configuration file /usr/local/etc/MailScanner/MailScanner.conf
            Jul 31 07:58:13  MailScanner[30780]: Reading configuration file /usr/local/etc/MailScanner/conf.d/README
            Jul 31 07:58:14  MailScanner[30780]: Read 867 hostnames from the phishing whitelist
            Jul 31 07:58:14  MailScanner[30780]: Read 5737 hostnames from the phishing blacklists
            Jul 31 07:58:14  MailScanner[30780]: User's home directory /var/spool/postfix is not writable
            Jul 31 07:58:14  MailScanner[30780]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
            Jul 31 07:58:14  MailScanner[30780]: Using SpamAssassin results cache
            Jul 31 07:58:14  MailScanner[30780]: Connected to SpamAssassin cache database
            Jul 31 07:58:15  MailScanner[30780]: Enabling SpamAssassin auto-whitelist functionality…

            I took a look at the mailscanner.conf and it appears the directories are created with 0600 with a user postfix?

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              @mschiek01:

              I took a look at the mailscanner.conf and it appears the directories are created with 0600 with a user postfix?

              Yes, maiscanner runs with postfix user.

              chown ('/var/spool/postfix','postfix');
              

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                @Unubtanium:

                Just to let you know that i also did get this error too and had to run the chown command to fix it.

                I'm not getting this error but I've included this folder check on mailscanner.inc file.

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • R
                  rbblue8
                  last edited by

                  Hi All,

                  I have the following packages installed.
                  Asterisk
                  mailreport
                  mailscanner-dev
                  postfix forwarder
                  squid3

                  Mailscanner refuses to load with the following.

                  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.

                  Please advise.

                  1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    check if you have multiple perl version on your pfsense.

                    type pkg_info | grep -i perl on console/ssh

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • R
                      rbblue8
                      last edited by

                      @marcelloc:

                      check if you have multiple perl version on your pfsense.

                      type pkg_info | grep -i perl on console/ssh

                      Thanks for the response.  Below is the outbound of your command.

                      
                      p5-Archive-Zip-1.30_1 Perl module to create, manipulate, read, and write Zip arch
                      p5-Convert-BinHex-1.119 Perl module to extract data from Macintosh BinHex files
                      p5-Convert-TNEF-0.17 Perl module to read TNEF files
                      p5-Crypt-OpenSSL-RSA-0.28 Perl5 module to RSA encode and decode strings using OpenSSL
                      p5-Crypt-OpenSSL-Random-0.04 Perl5 interface to the OpenSSL pseudo-random number generat
                      p5-DBI-1.616_1      The perl5 Database Interface.  Required for DBD::* modules
                      p5-Digest-HMAC-1.03 Perl5 interface to HMAC Message-Digest Algorithms
                      p5-Digest-SHA1-2.13 Perl interface to the SHA-1 Algorithm
                      p5-Error-0.17016    Perl module to provide Error/exception support for perl: Er
                      p5-Filesys-Df-0.92  Perl extension for filesystem space
                      p5-HTML-Parser-3.69 Perl5 module for parsing HTML documents
                      p5-IO-Compress-2.045 Perl5 compression modules (bzip2, deflate, gzip, zlib, zip)
                      p5-IO-Socket-INET6-2.69 Perl module with object interface to AF_INET6 domain socket
                      p5-IO-Socket-SSL-1.53 Perl5 interface to SSL sockets
                      p5-IO-stringy-2.110 Perl5 module for using IO handles with non-file objects
                      p5-Inline-0.49      Write Perl subroutines in other programming languages
                      p5-MIME-Tools-5.502,2 A set of perl5 modules for MIME
                      p5-Mail-ClamAV-0.29_1 Perl extension for the clamav virus scanner
                      p5-Mail-DKIM-0.39   Perl5 module to process and/or create DKIM email
                      p5-Mail-Tools-2.08  Perl5 modules for dealing with Internet e-mail messages
                      p5-Net-CIDR-0.14    Perl module to manipulate IPv4/IPv6 netblocks in CIDR notat
                      p5-Net-DNS-0.67     Perl5 interface to the DNS resolver, and dynamic updates
                      p5-Net-SSLeay-1.42  Perl5 interface to SSL
                      p5-NetAddr-IP-4.058 Perl module for working with IP addresses and blocks thereo
                      p5-OLE-Storage_Lite-0.19 Perl module for OLE document interface
                      p5-Parse-RecDescent-1.965.001 A recursive descent parsing framework for Perl
                      p5-Sys-SigAction-0.15 Perl extension for Consistent Signal Handling
                      p5-TimeDate-1.20,1  Perl5 module containing a better/faster date parser for abs
                      p5-URI-1.59         Perl5 interface to Uniform Resource Identifier (URI) refere
                      p5-libwww-6.02_1    Perl5 library for WWW access
                      p5-version-0.95     Perl extension for Version Objects
                      pcre-8.21           Perl Compatible Regular Expressions library
                      pcre-8.21_1         Perl Compatible Regular Expressions library
                      perl-5.12.4_3       Practical Extraction and Report Language
                      perl-threaded-5.12.4_4 Practical Extraction and Report Language
                      
                      

                      I did a fresh install of pfsense today and installed packages in the following order.  It looks like squid3 broke mailscanner for I was able to run mailscanner from command line until i installed squid.

                      Working Install
                      mailscanner-dev
                      Asterisk
                      postfix
                      squid3 – breaks it.

                      1 Reply Last reply Reply Quote 0
                      • R
                        rbblue8
                        last edited by

                        perhaps it's the perl-threaded-5.12.4_4 Practical Extraction and Report Languag package.

                        1 Reply Last reply Reply Quote 0
                        • R
                          rbblue8
                          last edited by

                          bump.

                          any idea's?

                          1 Reply Last reply Reply Quote 0
                          • marcellocM
                            marcelloc
                            last edited by

                            @rbblue8:

                            bump.

                            any idea's?

                            try to leave only one perl version(using pkg_delete -f) and reinstall mailscanner

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • R
                              rbblue8
                              last edited by

                              @marcelloc:

                              @rbblue8:

                              bump.

                              any idea's?

                              try to leave only one perl version(using pkg_delete -f) and reinstall mailscanner

                              I did the following.
                              Installed squid3
                              pkg_info | grep -i perl
                              pkg_delete -f perl-5.12.4_3
                              pkg_delete -f perl-threaded-5.12.4_4
                              rm -rf /usr/local/lib/perl5/5.12.4

                              Reinstalled mail scanner

                              works.  Thanks!

                              1 Reply Last reply Reply Quote 0
                              • E
                                expert_az
                                last edited by

                                marcelloc any way to do greylisting with mailscanner?

                                1 Reply Last reply Reply Quote 0
                                • marcellocM
                                  marcelloc
                                  last edited by

                                  There is a mailscanner greylist doc on official site http://www.mailscanner.info/greylist.html

                                  Postfix implements greylist with postscreen

                                  Treinamentos de Elite: http://sys-squad.com

                                  Help a community developer! ;D

                                  1 Reply Last reply Reply Quote 0
                                  • E
                                    expert_az
                                    last edited by

                                    i have postfix and mailscanner installed ,can you give some info howto config postfix postscreen to make work greylisting?

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      you need just to enable it. It's automatic

                                      take a look on it's docs too

                                      http://www.postfix.org/POSTSCREEN_README.html

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • E
                                        expert_az
                                        last edited by

                                        sorry,where i have to enable?on the postfix package gui?or something from command line?

                                        1 Reply Last reply Reply Quote 0
                                        • marcellocM
                                          marcelloc
                                          last edited by

                                          It's on antispam postfix tab at package gui

                                          Treinamentos de Elite: http://sys-squad.com

                                          Help a community developer! ;D

                                          1 Reply Last reply Reply Quote 0
                                          • E
                                            expert_az
                                            last edited by

                                            did you mean postscreen_greet_check on After greeting tests section of antispam tab?is this greylisting option?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.