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 276.1k 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.
    • I
      ikbendeman
      last edited by

      I've problems with starting mailscanner after an update to pfSense 2.1.

      service mailscanner start
      Starting mailscanner.
      eval: /usr/pbi/mailscanner-i386/sbin/mailscanner: not found
      /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

      ll /usr/pbi/mailscanner-i386/sbin/mailscanner
      -r-xr-xr-x  1 root  wheel  67459 Dec  8 06:40 /usr/pbi/mailscanner-i386/sbin/mailscanner

      I disabled mailscanner completely to keep receiving mail.

      I also run: pfBlocker, nrpe v2 and OpenVPN client.

      Please advice.

      Packagelist:

      bsdinstaller-2.0.2011.1212 BSD Installer mega-package
      ca_root_nss-3.15.2_1 The root certificate bundle from the Mozilla Project
      curl-7.33.0_1      Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
      cyrus-sasl-2.1.25_1 RFC 2222 SASL (Simple Authentication and Security Layer)
      cyrus-sasl-2.1.26_3 RFC 2222 SASL (Simple Authentication and Security Layer)
      db41-4.1.25_4      The Berkeley DB package, revision 4.1
      freetype2-2.4.11    A free and portable TrueType font rendering engine
      freetype2-2.4.7    A free and portable TrueType font rendering engine
      gd-2.0.35_7,1      A graphics library for fast creation of images
      gettext-0.18.1.1    GNU gettext package
      gettext-0.18.3.1    GNU gettext package
      grub-0.97_4        GRand Unified Bootloader
      ipmitool-1.8.11_2  CLI to manage IPMI systems
      jpeg-8_3            IJG's jpeg compression utilities
      jpeg-8_4            IJG's jpeg compression utilities
      libiconv-1.13.1_1  A character set conversion library
      libiconv-1.14      A character set conversion library
      libiconv-1.14_1    A character set conversion library
      libltdl-2.4.2_2    System independent dlopen wrapper
      libspf2-1.2.10_1    Sender Rewriting Scheme 2 C Implementation
      libstatgrab-0.17    Provides a useful interface to system statistics
      muse-0.2            Shows memory usage data
      nagios-plugins-1.4.15_1,1 Plugins for Nagios
      nrpe-2.12_3        Nagios Remote Plugin Executor
      openldap-client-2.4.33_1 Open source LDAP client implementation
      p5-Authen-NTLM-1.09 An NTLM authentication module
      p5-Crypt-OpenSSL-Bignum-0.04 OpenSSL's multiprecision integer arithmetic
      p5-Crypt-OpenSSL-RSA-0.28 Perl5 module to RSA encode and decode strings using OpenSSL
      p5-Crypt-OpenSSL-Random-0.06 Perl5 interface to the OpenSSL pseudo-random number generat
      p5-DBD-SQLite-1.40  Provides access to SQLite3 databases through the DBI
      p5-DBI-1.630        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-Encode-Locale-1.03 Determine the locale encoding
      p5-File-Listing-6.04 Parse directory listings
      p5-Filesys-Df-0.92  Perl extension for filesystem space
      p5-Geography-Countries-2009041301 Handle ISO-3166 country codes
      p5-HTML-Parser-3.71 Perl5 module for parsing HTML documents
      p5-HTML-Tagset-3.20 Some useful data table in parsing HTML
      p5-HTTP-Cookies-6.01 HTTP Cookie jars
      p5-HTTP-Daemon-6.01 Simple HTTP server class
      p5-HTTP-Date-6.02  Conversion routines for the HTTP protocol date formats
      p5-HTTP-Message-6.06_2 Representation of HTTP style messages
      p5-HTTP-Negotiate-6.01 Implementation of the HTTP content negotiation algorithm
      p5-IO-HTML-1.00    Open an HTML file with automatic charset detection
      p5-IO-Socket-INET6-2.69 Perl module with object interface to AF_INET6 domain socket
      p5-IO-Socket-IP-0.24 Drop-in replacement for IO::Socket::INET supporting IPv4 an
      p5-IO-Socket-SSL-1.962 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-LWP-MediaTypes-6.02 Guess media type for a file or a URL
      p5-Mail-DKIM-0.40  Perl5 module to process and/or create DKIM email
      p5-Mail-Tools-2.12  Perl5 modules for dealing with Internet e-mail messages
      p5-Net-CIDR-0.17    Perl module to manipulate IPv4/IPv6 netblocks in CIDR notat
      p5-Net-DNS-0.73    Perl5 interface to the DNS resolver, and dynamic updates
      p5-Net-HTTP-6.06    Low-level HTTP client
      p5-Net-Ident-1.23  Lookup the username on the remote end of a TCP/IP connectio
      p5-Net-SSLeay-1.55  Perl5 interface to SSL
      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-Socket-2.013    Networking constants and support functions
      p5-Socket6-0.23    IPv6 related part of the C socket.h defines and structure m
      p5-Sys-Hostname-Long-1.4 Try every conceivable way to get full hostname
      p5-Sys-SigAction-0.20 Perl extension for Consistent Signal Handling
      p5-Time-HiRes-1.9726,1 A perl5 module implementing High resolution time, sleep, an
      p5-TimeDate-2.30_1,1 Perl5 module containing a better/faster date parser for abs
      p5-URI-1.60        Perl5 interface to Uniform Resource Identifier (URI) refere
      p5-WWW-RobotRules-6.02 Database of robots.txt-derived permissions
      p7zip-9.20.1        File archiver with high compression ratio
      pcre-8.33          Perl Compatible Regular Expressions library
      perl5-5.16.3_4      Practical Extraction and Report Language
      pkg-config-0.25_1  A utility to retrieve information about installed libraries
      pkgconf-0.8.9      Utility to help to configure compiler and linker flags
      png-1.4.8          Library for manipulating PNG images
      postfix-2.10.2,1    Secure alternative to widely-used Sendmail
      python27-2.7.6      Interpreted object-oriented programming language
      razor-agents-2.84  A distributed, collaborative, spam detection and filtering
      sqlite-2.8.17_1    An SQL database engine in a C library
      sqlite3-3.7.9      An SQL database engine in a C library
      tnef-1.4.9          Unpack data in MS Outlook TNEF format
      zip-3.0            Create/update ZIP files compatible with pkzip

      1 Reply Last reply Reply Quote 0
      • C
        capitangiaco
        last edited by

        @ikbendeman:

        I've problems with starting mailscanner after an update to pfSense 2.1.

        service mailscanner start
        Starting mailscanner.
        eval: /usr/pbi/mailscanner-i386/sbin/mailscanner: not found
        /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

        ll /usr/pbi/mailscanner-i386/sbin/mailscanner
        -r-xr-xr-x  1 root  wheel  67459 Dec  8 06:40 /usr/pbi/mailscanner-i386/sbin/mailscanner

        I disabled mailscanner completely to keep receiving mail.

        have you tried to reinstall the mailscanner pkg ?

        Giacomo

        1 Reply Last reply Reply Quote 0
        • I
          ikbendeman
          last edited by

          Hi Giacomo,

          Yes, I did reinstall the package… but same result.
          Even a fresh install did not fixed the problem. (Fresh install from 2.0.3 with update to 2.1)

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

            I am experiencing the same results of MailScanner on my pfSense 2.0.1 upgrade to 2.1-Release but on the AMD64 platform as ikbendeman.  I even performed a clean install of pfSense 2.1-Release, then Postfix, then MailScanner.  I have re-installed MailScanner package several times but it still fails to start with this response:

            Dec 8 16:00:17 root: /usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner: WARNING: failed to start mailscanner
            Dec 8 16:00:17 php: /pkg_edit.php: The command '/usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner start' returned exit code '1', the output was 'Starting mailscanner. eval: /usr/pbi/mailscanner-amd64/sbin/mailscanner: not found /usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner: WARNING: failed to start mailscanner'

            When I try and manually start from the Services GUI, I get this:

            Dec 8 17:31:37 php: /status_services.php: The command '/usr/local/etc/rc.d/mailscanner stop' returned exit code '1', the output was 'mailscanner not running? (check /var/run/MailScanner.pid).'
            Dec 8 17:31:39 root: /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

            Being that pfSense 2.1 uses a different tree directory, it seems that MailScanner (4.84.5_3 pkg v.0.2.2 ) is not ready for pfSense 2.1.

            I would hate to have to downgrade pfSense to 2.0.1 in order for MailScanner to work right.

            1 Reply Last reply Reply Quote 0
            • C
              capitangiaco
              last edited by

              @EHN_Helpdesk:

              Dec 8 16:00:17 root: /usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner: WARNING: failed to start mailscanner
              Dec 8 16:00:17 php: /pkg_edit.php: The command '/usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner start' returned exit code '1', the output was 'Starting mailscanner. eval: /usr/pbi/mailscanner-amd64/sbin/mailscanner: not found /usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner: WARNING: failed to start mailscanner'

              When I try and manually start from the Services GUI, I get this:

              Dec 8 17:31:37 php: /status_services.php: The command '/usr/local/etc/rc.d/mailscanner stop' returned exit code '1', the output was 'mailscanner not running? (check /var/run/MailScanner.pid).'
              Dec 8 17:31:39 root: /usr/local/etc/rc.d/mailscanner: WARNING: failed to start mailscanner

              Your manual start failed cause you are using the wrong rc script.
              You have to use /usr/pbi/mailscanner-amd64/etc/rc.d/mailscanner start/stop
              If you don't have, create the link:

              ls -l /usr/local/sbin/mailscanner

              lrwxr-xr-x  1 root  wheel  43 Dec  2 18:33 /usr/local/sbin/mailscanner -> /usr/pbi/mailscanner-i386/.sbin/mailscanner
              adapt to your architecture (amd64)

              Giacomo

              1 Reply Last reply Reply Quote 0
              • I
                ikbendeman
                last edited by

                you advice to run: /usr/local/sbin/mailscanner (where mailscanner is in the hidden .sbin directory)

                ll /usr/local/sbin/mailscanner
                lrwxr-xr-x  1 root  wheel  43 Dec  8 06:37 /usr/local/sbin/mailscanner -> /usr/pbi/mailscanner-i386/.sbin/mailscanner

                Then mailscanner doesn't return an error but mailscanner is not started!

                ps ax | grep -i mailscanner
                19657  ??  Is    3:02.05 /usr/pbi/mailscanner-i386/sbin/clamd
                93386  0  R+    0:00.00 grep -i mailscanner

                The confusion starts with two mailscanner scripts:

                ll /usr/pbi/mailscanner-i386/sbin/mailscanner
                -r-xr-xr-x  1 root  wheel  67459 Dec  8 06:40 /usr/pbi/mailscanner-i386/sbin/mailscanner
                ll /usr/pbi/mailscanner-i386/.sbin/mailscanner
                -rwxr-xr-x  1 root  wheel  8956 Dec  6 17:04 /usr/pbi/mailscanner-i386/.sbin/mailscanner

                Restarting mailscanner in the GUI doesn't work either.

                Pls advice

                Regards

                Bob

                1 Reply Last reply Reply Quote 0
                • C
                  capitangiaco
                  last edited by

                  I am not able to set this:

                  Sign Clean Message = no

                  I created the file:
                  /usr/pbi/mailscanner-i386/etc/MailScanner/conf.d/custom.conf
                  and put there the option and restart mailscanner, but nothing happens.

                  some help ?
                  thanks

                  Giacomo

                  1 Reply Last reply Reply Quote 0
                  • I
                    ics
                    last edited by

                    Hi Marcello,

                    Did you try MailWatch on 2.1 ?
                    You said in another post that in 2.0 it breaks pfsense php…

                    The most wanted feature of mailwatch is probably the Quarantine management.
                    Is it still in the roadmap for mailscanner ?

                    Thanks

                    1 Reply Last reply Reply Quote 0
                    • I
                      Ivart
                      last edited by

                      Hello Marcelloc, after update mailscanner fails with SpamAssassin, and I think not scanning messages anymore.
                      Maillog showing messages below in loop.

                      MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                      MailScanner[99955]: Reading configuration file /usr/pbi/mailscanner-i386/etc/MailScanner/MailScanner.conf
                      MailScanner[99955]: Reading configuration file /usr/pbi/mailscanner-i386/etc/MailScanner/conf.d/README
                      MailScanner[99955]: Read 869 hostnames from the phishing whitelist
                      MailScanner[99955]: Read 5435 hostnames from the phishing blacklists
                      MailScanner[99955]: Message Content Protection SpamAssassin installation could not be found

                      1 Reply Last reply Reply Quote 0
                      • M
                        m.mascheroni
                        last edited by

                        Hi Marcello, how can i totally disable Attachment scan and replace?

                        1 Reply Last reply Reply Quote 0
                        • I
                          Ivart
                          last edited by

                          @marcelloc:

                          I could get it working only if I change user to root.

                          I'll keep trying to use it with unprivileged user.

                          Have you found any solution for clamd error?

                          1 Reply Last reply Reply Quote 0
                          • M
                            m.mascheroni
                            last edited by

                            @m.mascheroni:

                            Hi Marcello, how can i totally disable Attachment scan and replace?

                            Setting Maximum Archive depth to 0 did the trick.
                            A reboot is also necessary because somehow a service restart throw an error not having permission to stop and restart postfix.

                            1 Reply Last reply Reply Quote 0
                            • I
                              ikbendeman
                              last edited by

                              I've still problems with starting MailScanner.

                              I did a fresh install of pfSense 2.1 and restored my config. But still a red cross for MailScanner.

                              When I start MailScanner manually, I get these messages:

                              Stopping mailscanner.
                              Waiting for PIDS: 8725.
                              Starting mailscanner.
                              /usr/pbi/mailscanner-i386/libexec/MailScanner/mailscanner_create_locks: not found
                              Error: Attempt to create locks in /var/spool/MailScanner/incoming/Locks failed!
                              /usr/pbi/mailscanner-i386/libexec/MailScanner/mailscanner_create_locks: not found
                              Error: Attempt to create locks in /var/spool/MailScanner/incoming/Locks failed!

                              I believe the permissions on the Locks directory are right.

                              drwxr-xr-x  2 postfix  wheel  512 Dec 17 21:37 Locks

                              Pls advice.

                              Bob

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

                                I'm not getting this folder permission error but I've pushed fixes to service status and pyzor checks.

                                Try to reinstall the package.

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

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • C
                                  capitangiaco
                                  last edited by

                                  Hi

                                  I've upgrade the mailscanner pkg to 4.84.5_3 pkg v.0.2.4 but I've still problems with spamassassin.
                                  If I turn on spam check, every MailScanner children go zombie and from logs I can only see:
                                  mailscanner: Process did not exit cleanly, returned 0 with signal 11
                                  If I try /usr/pbi/mailscanner-i386/bin/spamassassin –lint I don't see syntax error
                                  The daemon is running:

                                  ps aux | grep spamd

                                  root    60399  0.0  0.8 36664 34000  ??  Ss    3Dec13  4:16.37 /usr/pbi/mailscanner-i386/bin/spamd -c -d -r /var/run/spamd/spamd.pid (perl)
                                  root    70258  0.0  0.9 37688 34692  ??  I    3Dec13  0:02.40 spamd child (perl)
                                  root    70542  0.0  0.8 36664 34000  ??  I    3Dec13  0:02.44 spamd child (perl)

                                  I don't know what to try...
                                  There is the way to pass custom directives to mailscanner ?

                                  thanks

                                  Giacomo

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

                                    Disable pyzor checks and see if spamassassin starts working.

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

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      capitangiaco
                                      last edited by

                                      @marcelloc:

                                      Disable pyzor checks and see if spamassassin starts working.

                                      negative, same problem…
                                      thanks

                                      Giacomo

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

                                        What you get with

                                        Spamassassin –lint

                                        And sa-update

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

                                        Help a community developer! ;D

                                        1 Reply Last reply Reply Quote 0
                                        • I
                                          ikbendeman
                                          last edited by

                                          Hi Marcello,

                                          I did reinstall the latest mailscanner, but still not able to start MailScanner. (remove and install)

                                          /usr/local/etc/rc.d/mailscanner onerestart
                                          mailscanner not running? (check /var/run/MailScanner.pid).
                                          Starting mailscanner.
                                          eval: /usr/pbi/mailscanner-i386/sbin/mailscanner: not found

                                          ls -l /usr/pbi/mailscanner-i386/sbin/mailscanner
                                          -r-xr-xr-x  1 root  wheel  67431 Dec  6 17:04 /usr/pbi/mailscanner-i386/sbin/mailscanner

                                          ps -aux | grep MailScanner
                                          postfix  4262  0.0  1.2 27712 24872  ??  INs  Tue08PM  0:00.02 MailScanner: master waiting for children, sleeping (perl5.16.3)
                                          postfix  4589  0.0  2.8 61108 58584  ??  SN  Tue08PM  0:20.49 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 21247  0.0  2.8 61108 58580  ??  SN  Tue08PM  0:19.67 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 28672  0.0  2.8 61108 58580  ??  SN  Tue08PM  0:20.55 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 37414  0.0  2.8 61108 58580  ??  SN  Tue08PM  0:19.78 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 38894  0.0  2.8 61108 58580  ??  SN  Tue08PM  0:19.59 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 39779  0.0  1.2 27712 25060  ??  Is  Tue08PM  0:00.02 MailScanner: master waiting for children, sleeping (perl5.16.3)
                                          postfix 39788  0.0  2.8 61108 58724  ??  S    Tue08PM  0:21.14 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 41053  0.0  2.8 61108 58720  ??  S    Tue08PM  0:20.84 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 42573  0.0  2.8 61108 58724  ??  S    Tue08PM  0:19.89 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 45571  0.0  1.2 27712 25060  ??  INs  8:34AM  0:00.02 MailScanner: master waiting for children, sleeping (perl5.16.3)
                                          postfix 45822  0.0  2.8 61108 58640  ??  SN    8:34AM  0:13.29 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 46515  0.0  2.8 61108 58720  ??  SN    8:34AM  0:13.29 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 47267  0.0  2.8 61108 58720  ??  S    Tue08PM  0:20.13 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 47560  0.0  2.8 61108 58720  ??  SN    8:35AM  0:13.38 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 47883  0.0  2.8 61108 58720  ??  SN    8:35AM  0:13.07 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 49200  0.0  2.8 61108 58720  ??  SN    8:35AM  0:12.99 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 51141  0.0  2.8 61108 58720  ??  S    Tue08PM  0:20.76 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 63879  0.0  1.2 27712 25060  ??  INs  8:36AM  0:00.02 MailScanner: master waiting for children, sleeping (perl5.16.3)
                                          postfix 63908  0.0  2.8 61108 58720  ??  SN    8:36AM  0:13.31 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 65098  0.0  2.8 61108 58720  ??  SN    8:36AM  0:13.19 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 65636  0.0  2.8 61108 58720  ??  SN    8:36AM  0:13.24 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 66067  0.0  2.8 61108 58720  ??  SN    8:36AM  0:13.07 MailScanner: waiting for messages (perl5.16.3)
                                          postfix 66291  0.0  2.8 61108 58720  ??  SN    8:36AM  0:13.02 MailScanner: waiting for messages (perl5.16.3)
                                          root    79263  0.0  0.1  3468  1252  0  S+    2:42PM  0:00.00 grep MailScanner

                                          spamassassin –lint
                                          Dec 20 14:44:50.920 [19574] warn: config: failed to parse line, skipping, in "/usr/pbi/mailscanner-i386/etc/mail/spamassassin/mailscanner.cf": use_auto_whitelist 0
                                          Dec 20 14:44:55.677 [19574] warn: lint: 1 issues detected, please rerun with debug enabled for more information

                                          Hope this will give you a little bit inside.

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

                                            Mailscanner daemon should be perl_mailscanner instead of perl 5.16. Are you sure you reinstalled it?

                                            Amd64 version still has perl 5.14

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

                                            Help a community developer! ;D

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