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 275.0k 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
      DraNick
      last edited by

      Hello,

      Upon MailScanner –lint I have the following output:

      
      MailScanner --lint
      Trying to setlogsock(unix)
      ...
      Checking version numbers...
      Version number in MailScanner.conf (4.84.5) is correct.
      
      Your envelope_sender_header in spam.assassin.prefs.conf is correct.
      MailScanner setting GID to  (1003)
      MailScanner setting UID to  (1003)
      ...
      
      Cannot chdir to /var/spool/MailScanner/incoming/47712, Permission denied at /usr/local/lib/MailScanner/MailScanner/WorkArea.pm line 235
      
      

      I have chowned /var/spool/MailScanner/incoming to postfix -> chown -R postfix:postfix (as MailScanner runs with GID/UID 1003 and that corresponds to postfix on my system) but I still get the error.

      Please help!

      Thank you,

      Nick

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

        changeuser clamav to postfix in conf file  /usr/local/etc/clamd.conf

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

          @expert_az:

          changeuser clamav to postfix in conf file  /usr/local/etc/clamd.conf

          Thank you for your reply but it didn't work. I have the same error even with user postfix in clamd.conf.

          On a different note, do you happen to know how I can prevent the system to overwrite permission settings on restart? Also, if I restart MailScanner it overwrites the manual changes I make to MaiScanner.conf :(

          Thank you in advance!

          1 Reply Last reply Reply Quote 0
          • N
            n3tg33k
            last edited by

            Hi, Milscanner package is start but its shows stop on the gui and when i restart it in terminal

            cd /usr/pbi/mailscanner-amd64/etc/rc.d
            ./mailscanner restart

            I get these errors http://pastebin.com/CLH9Yi4h

            I read previews posts and they didn't work

            Thank you

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

              hello ,i'm getting following error on new pf 2.1 amd64

              Sep 26 12:43:56 mailscanner: Process did not exit cleanly, returned 2 with signal 0
              Sep 26 12:44:01 mailscanner: Process did not exit cleanly, returned 2 with signal 0

              any idea?

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

                any answer?

                1 Reply Last reply Reply Quote 0
                • Z
                  zlyzwy
                  last edited by

                  Hi Marcelloc,

                  I upgrade my pf from 2.03 to 2.1 release version, it seems postfix and mailscanner is not working properly. I can still receive email but I believe mailscanner is not working in background. There is no log in "search mail" option.

                  # postfix check
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  /usr/pbi/postfix-i386/sbin/postconf: warning: /usr/pbi/postfix-i386/etc/postfix/master.cf: unused parameter: user=postfix
                  postfix/postfix-script: warning: not owned by root: /var/spool/postfix
                  
                  
                  # MailScanner --lint
                  Trying to setlogsock(unix)
                  
                  Reading configuration file /usr/pbi/mailscanner-i386/etc/MailScanner/MailScanner.conf
                  Reading configuration file /usr/local/etc/MailScanner/conf.d/README
                  Read 865 hostnames from the phishing whitelist
                  Read 5278 hostnames from the phishing blacklists
                  
                  Checking version numbers...
                  Version installed (4.84.5) does not match version stated in
                  MailScanner.conf file (4.83.5), you may want to run upgrade_MailScanner_conf
                  to ensure your MailScanner.conf file contains all the latest settings.
                  
                  Your envelope_sender_header in spam.assassin.prefs.conf is correct.
                  MailScanner setting GID to  (125)
                  MailScanner setting UID to  (125)
                  
                  Checking for SpamAssassin errors (if you use it)...
                  Using SpamAssassin results cache
                  Connected to SpamAssassin cache database
                  SpamAssassin reported no errors.
                  I have found  scanners installed, and will use them all by default.
                  You appear to have no virus scanners installed at all! This is not good. If you have installed any, then check your virus.scanners.conf file to make sure the locations of your scanners are correct at /usr/pbi/mailscanner-i386/lib/MailScanner/MailScanner/SweepViruses.pm line 518
                  Connected to Processing Attempts Database
                  Created Processing Attempts Database successfully
                  There is 1 message in the Processing Attempts Database
                  Using locktype = posix
                  MailScanner.conf says "Virus Scanners = auto"
                  Found these virus scanners installed:
                  ===========================================================================
                  Cannot chdir to /var/spool/MailScanner/incoming/87670, Permission denied at /usr/pbi/mailscanner-i386/lib/MailScanner/MailScanner/WorkArea.pm line 235
                  
                  

                  Thanks
                  Zlyzwy

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

                    Marcelloc, same issue from Zlyzwy, any solution?

                    Thanks.

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

                      Hi Marcelloc,

                      any success running mailscanner on amd64 2.1  platform?

                      I wrote it before but any answer?

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

                        I'll check it.

                        Sorry for the late response.

                        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

                          log was like this

                          Sep 26 12:43:56  mailscanner: Process did not exit cleanly, returned 2 with signal 0
                          Sep 26 12:44:01  mailscanner: Process did not exit cleanly, returned 2 with signal 0

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

                            I've pushed some fixes to the package.

                            I'm Still testing/checking clamav startup.

                            I've not bumped version yet, so just reinstall the package in 15 minutes.

                            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

                              marcelloc it seems ok now,I tested it on my test PF 2.1 amd64

                              some new restart logs:

                              Nov 12 09:52:18 MailScanner[54679]: Using locktype = flock
                              Nov 12 09:52:18 MailScanner[54679]: Found 0 messages in the Processing Attempts Database
                              Nov 12 09:52:18 MailScanner[54679]: Connected to Processing Attempts Database
                              Nov 12 09:52:18 MailScanner[54679]: I have found clamd scanners installed, and will use them all by default.
                              Nov 12 09:52:13 MailScanner[39454]: Using locktype = flock
                              Nov 12 09:52:13 MailScanner[39454]: Found 0 messages in the Processing Attempts Database
                              Nov 12 09:52:13 MailScanner[39454]: Connected to Processing Attempts Database
                              Nov 12 09:52:13 MailScanner[39454]: I have found clamd scanners installed, and will use them all by default.
                              Nov 12 09:52:08 MailScanner[29067]: Using locktype = flock
                              Nov 12 09:52:08 MailScanner[29067]: Found 0 messages in the Processing Attempts Database
                              Nov 12 09:52:08 MailScanner[29067]: Connected to Processing Attempts Database
                              Nov 12 09:52:08 MailScanner[29067]: I have found clamd scanners installed, and will use them all by default.
                              Nov 12 09:51:10 MailScanner[75549]: Enabling SpamAssassin auto-whitelist functionality…
                              Nov 12 09:51:10 MailScanner[75549]: Connected to SpamAssassin cache database
                              Nov 12 09:51:10 MailScanner[75549]: Using SpamAssassin results cache
                              Nov 12 09:51:09 MailScanner[75549]: Read 5426 hostnames from the phishing blacklists
                              Nov 12 09:51:09 MailScanner[75549]: Read 869 hostnames from the phishing whitelist
                              Nov 12 09:51:09 MailScanner[75549]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/conf.d/README
                              Nov 12 09:51:09 MailScanner[75549]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/MailScanner.conf
                              Nov 12 09:51:09 MailScanner[75549]: MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                              Nov 12 09:51:04 MailScanner[63466]: Enabling SpamAssassin auto-whitelist functionality…
                              Nov 12 09:51:04 MailScanner[63466]: Connected to SpamAssassin cache database
                              Nov 12 09:51:04 MailScanner[63466]: Using SpamAssassin results cache
                              Nov 12 09:51:04 MailScanner[63466]: Read 5426 hostnames from the phishing blacklists
                              Nov 12 09:51:04 MailScanner[63466]: Read 869 hostnames from the phishing whitelist
                              Nov 12 09:51:04 MailScanner[63466]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/conf.d/README
                              Nov 12 09:51:04 MailScanner[63466]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/MailScanner.conf
                              Nov 12 09:51:04 MailScanner[63466]: MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                              Nov 12 09:50:59 MailScanner[54679]: Enabling SpamAssassin auto-whitelist functionality…
                              Nov 12 09:50:59 MailScanner[54679]: Connected to SpamAssassin cache database
                              Nov 12 09:50:59 MailScanner[54679]: Using SpamAssassin results cache
                              Nov 12 09:50:59 MailScanner[54679]: Read 5426 hostnames from the phishing blacklists
                              Nov 12 09:50:59 MailScanner[54679]: Read 869 hostnames from the phishing whitelist
                              Nov 12 09:50:59 MailScanner[54679]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/conf.d/README
                              Nov 12 09:50:59 MailScanner[54679]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/MailScanner.conf
                              Nov 12 09:50:59 MailScanner[54679]: MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                              Nov 12 09:50:54 MailScanner[39454]: Enabling SpamAssassin auto-whitelist functionality…
                              Nov 12 09:50:54 MailScanner[39454]: Connected to SpamAssassin cache database
                              Nov 12 09:50:54 MailScanner[39454]: Using SpamAssassin results cache
                              Nov 12 09:50:54 MailScanner[39454]: Read 5426 hostnames from the phishing blacklists
                              Nov 12 09:50:54 MailScanner[39454]: Read 869 hostnames from the phishing whitelist
                              Nov 12 09:50:54 MailScanner[39454]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/conf.d/README
                              Nov 12 09:50:54 MailScanner[39454]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/MailScanner.conf
                              Nov 12 09:50:54 MailScanner[39454]: MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                              Nov 12 09:50:49 MailScanner[29067]: Enabling SpamAssassin auto-whitelist functionality…
                              Nov 12 09:50:49 MailScanner[29067]: Connected to SpamAssassin cache database
                              Nov 12 09:50:49 MailScanner[29067]: Using SpamAssassin results cache
                              Nov 12 09:50:49 MailScanner[29067]: Read 5426 hostnames from the phishing blacklists
                              Nov 12 09:50:49 MailScanner[29067]: Read 869 hostnames from the phishing whitelist
                              Nov 12 09:50:49 MailScanner[29067]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/conf.d/README
                              Nov 12 09:50:49 MailScanner[29067]: Reading configuration file /usr/pbi/mailscanner-amd64/etc/MailScanner/MailScanner.conf
                              Nov 12 09:50:49 MailScanner[29067]: MailScanner E-Mail Virus Scanner version 4.84.5 starting…
                              Nov 12 09:50:45 MailScanner[79786]: MailScanner child caught a SIGHUP
                              Nov 12 09:50:45 MailScanner[10068]: MailScanner child caught a SIGHUP
                              Nov 12 09:50:45 MailScanner[94107]: MailScanner child caught a SIGHUP
                              Nov 12 09:50:45 MailScanner[9153]: MailScanner child caught a SIGHUP
                              Nov 12 09:50:45 MailScanner[86355]: MailScanner child caught a SIGHUP
                              Nov 12 09:50:45 php: /pkg_edit.php: Restarting MailScanner
                              Nov 12 09:50:33 php: /pkg_edit.php: Restarting clamav-clamd daemon
                              Nov 12 09:50:33 check_reload_status: Syncing firewall

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

                                Great! :)

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

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  Guest
                                  last edited by

                                  Thanks marcelloc,
                                  Can you write a mini how-to for mailscanner package?

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

                                    Thanks marcelloc, service status is ok but the clamd error is the same:

                                    
                                    Nov 14 11:56:24 treknetgw MailScanner[73800]: Virus and Content Scanning: Starting
                                    Nov 14 11:56:24 treknetgw MailScanner[73800]: Clamd::ERROR:: UNKNOWN CLAMD RETURN ./lstat() failed: Permission denied. ERROR :: /var/spool/MailScanner/incoming/73800
                                    Nov 14 11:56:24 treknetgw MailScanner[73800]: Virus Scanning: Clamd found 1 infections
                                    Nov 14 11:56:24 treknetgw MailScanner[73800]: Virus Scanning: Found 1 viruses
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      @Ivart:

                                      but the clamd error is the same:

                                      Still checking it…

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

                                      Help a community developer! ;D

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

                                        @Amirkabir:

                                        Can you write a mini how-to for mailscanner package?

                                        Configure package from left to right. All default options are in (yes/no)

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

                                        Help a community developer! ;D

                                        1 Reply Last reply Reply Quote 0
                                        • ?
                                          Guest
                                          last edited by

                                          Do i need to install postfix?

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

                                            Yes. Install Postfix and then MailScanner, enable MailScanner in Antispam section of Postfix, Third part Antispam Settings.

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