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

    Mailscanner UNOFFICIAL package for pfSense 2.3.x

    Scheduled Pinned Locked Moved pfSense Packages
    36 Posts 10 Posters 9.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.
    • D
      DannyB
      last edited by

      Hi, i have postfix and mailscanner running on pfsense 2.4.4-p1, i got the following warnings:

      MailScanner[64731]: Clamd::ERROR:: UNKNOWN CLAMD RETURN ./lstat() failed: Permission denied. ERROR :: /var/spool/MailScanner/incoming/64731

      Permissions looks fine, i did chown -R postfix:postfix /var/spool/MailScanner/incoming/, also chmod -R 6666 to the same folder.

      Runas user on MailScanner.conf and clamd.conf is postfix.

      Also mailscanner logs display syntax errors:

      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Syntax error(s) in configuration file:
      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "deliversuspiciouspdf" at line 93
      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "pdfidcommand" at line 84
      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "pdfidtimeout" at line 87
      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "scanpdf" at line 90
      Mar 6 16:09:51 pfsense2 MailScanner[56749]: Warning: syntax errors in /usr/local/etc/MailScanner/MailScanner.conf.

      Please Help.

      BismarckB 1 Reply Last reply Reply Quote 0
      • BismarckB
        Bismarck @DannyB
        last edited by

        @dannyb

        Try

        chown -R postfix:clamav /var/spool/MailScanner/

        and

        chmod -R 0770 /var/spool/MailScanner/

        D 1 Reply Last reply Reply Quote 0
        • D
          DannyB @Bismarck
          last edited by

          @bismarck

          Thanks Bismarck, i just did it but i got the same errors.

          0_1551970237056_164a3c35-b5f3-4ce7-b317-ba608e17e06c-image.png

          1 Reply Last reply Reply Quote 0
          • D
            DannyB
            last edited by

            Here is what i got grom "MailScanner --lint"

            0_1551970863764_9714b9e2-937b-490c-90e1-ec47895dcc0e-image.png

            BismarckB V 2 Replies Last reply Reply Quote 0
            • BismarckB
              Bismarck @DannyB
              last edited by Bismarck

              @dannyb
              0_1551974979662_ec5ab7d8-ff9a-48e5-80bd-6132b5eb5a97-image.png

              Only difference I see is "GID/UID" and "Virus Scanner = clamd"

              ? http://lists.mailscanner.info/pipermail/mailscanner/2018-March/105077.html

              Here are all files I have running with pfSense 2.4.4-p2 and Postfix/MailScanner

              https://github.com/spec1re/stuff/raw/spec1re-patch-1/Unofficial-pfSense-packages-master.rar

              unpack it, execute

              1. ./install_mailscanner_24.sh
              2. ./install_cpan_modules_24.sh

              and manually copy the other files, overwriting existing ones.

              D 1 Reply Last reply Reply Quote 1
              • D
                DannyB @Bismarck
                last edited by

                @bismarck

                Ok, i will do it, i´ll let you know.

                Thanks again.

                1 Reply Last reply Reply Quote 0
                • D
                  DannyB
                  last edited by

                  i must be doing something wrong, i did a clean install pfsense 2.4.4-p1, install unofficial repo, enable FreeBSD in all repos, ran script install_postfix_24.sh, fixed postwhite error fetching the postwhite.conf file from stevejenkins and changing paths in the file, installed mailscanner and cpan from your packet, override every files as suggested and i got the same error.

                  Postfix and MailScanner are running but got the same errors.

                  BismarckB 1 Reply Last reply Reply Quote 0
                  • BismarckB
                    Bismarck @DannyB
                    last edited by Bismarck

                    @dannyb

                    the MailScanner.conf errors are just cosmetic, to get rid of them just edit

                    /usr/local/pkg/mailscanner.conf.template

                    and comment out line 82 till 98, restart mailscanner via the web interface and they should go away.

                    For the clamd error, you need to check the permissions defined in the configs of mailscanner and clamd eg. add postfix to the clamav group and viceversa.

                    1 Reply Last reply Reply Quote 1
                    • D
                      DannyB
                      last edited by DannyB

                      Thanks Bismarck, that fix the errors. at first i added clamav as group for Incoming Work Dir Settings only in MailScanner.conf, but adding clamav as a group in system settings was the trick.

                      BismarckB 1 Reply Last reply Reply Quote 0
                      • BismarckB
                        Bismarck @DannyB
                        last edited by

                        @dannyb

                        Nice to hear, and now you can start tuning SA / ClamAV rules and signatures. ;)

                        1 Reply Last reply Reply Quote 0
                        • V
                          VenimK @DannyB
                          last edited by

                          @DannyB

                          Using pfSense 2.4.4-p3
                          When trying to install these ,i always end up with error

                          pHP errors
                          PHP ERROR: Type: 64, File: /root/check_mailscanner_service.php, Line: 6, Message: require_once(): Failed opening required 'xmlrpc.inc' (include_path='.:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/') @ 2019-12-07 06:41:21

                          BismarckB 1 Reply Last reply Reply Quote 0
                          • BismarckB
                            Bismarck @VenimK
                            last edited by

                            @VenimK

                            Try

                            touch /etc/inc/xmlrpc.inc

                            and rerun the install.

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