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

Postfix - antispam and relay package

Scheduled Pinned Locked Moved
pfSense Packages
136
855
977.9k
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.
  • marcellocM
    marcelloc
    last edited by May 31, 2017, 5:13 PM

    @Rene.vandenBroek:

    @Marcelloc,

    Could there be something missing in the UnOfficial Repo, the mailscanner and Postfix packages cannot be found.

    It's not there yet. the pkg add for postfix and mailscanner will have only gui files for now because it needs a lot of dependencies from FreeBSD.

    Keep using the install script.

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

    Help a community developer! ;D

    1 Reply Last reply Reply Quote 0
    • R
      Rene.vandenBroek
      last edited by May 31, 2017, 5:29 PM

      Unfortunately the install script searches the repo for the package..

      here's a the entire output from the install script. It can't install the patches, because the files to patch ain't there.

       sh ./install_mailscanner_23.sh
      fetching  /usr/local/www/mailscanner_about.php from github
      fetching  /usr/local/pkg/mailscanner.conf.template from github
      fetching  /usr/local/pkg/mailscanner.xml from github
      fetching  /usr/local/pkg/mailscanner_antispam.xml from github
      fetching  /usr/local/pkg/mailscanner_attachments.xml from github
      fetching  /usr/local/pkg/mailscanner_report.xml from github
      fetching  /usr/local/pkg/mailscanner.inc from github
      fetching  /usr/local/pkg/mailscanner_alerts.xml from github
      fetching  /usr/local/pkg/mailscanner_antivirus.xml from github
      fetching  /usr/local/pkg/mailscanner_content.xml from github
      fetching  /usr/local/pkg/mailscanner_sync.xml from github
      fetching  /usr/local/www/shortcuts/pkg_mailscanner.inc from github
      fetching  /usr/local/bin/sa-updater-custom-channels.sh from github
      fetching  /usr/local/bin/sa-wrapper.pl from github
      Locking pkg-1.10.1_1
      Updating Unofficial repository catalogue...
      Fetching meta.txz: 100%    260 B   0.3kB/s    00:01
      Fetching packagesite.txz: 100%    2 KiB   2.3kB/s    00:01
      Processing entries: 100%
      Unofficial repository update completed. 5 packages processed.
      Updating pfSense-core repository catalogue...
      pfSense-core repository is up to date.
      Updating pfSense repository catalogue...
      pfSense repository is up to date.
      All repositories are up to date.
      
      pkg-1.10.1_1 is locked and may not be modified
      pkg: No packages available to install matching 'mailscanner' have been found in the repositories
      0cd: root: No such file or directory
      fetch: https://github.com/extremeshok/spamassassin-extremeshok_fromreplyto/archive/master.zip: size of remote file is not known
      extremeshok_fromreplyto.zip                           7385  B   34 MBps 00m00s
      fetch: https://github.com/smfreegard/DecodeShortURLs/archive/master.zip: size of remote file is not known
      DecodeShortURLs.zip                                     11 kB   39 MBps 00m00s
      pdfid.zip                                     100% of 9679  B   54 MBps 00m00s
      fetch: https://github.com/extremeshok/clamav-unofficial-sigs/archive/master.zip: size of remote file is not known
      clamav-unofficial-sigs.zip                              76 kB  353 kBps 00m00s
      ./install_mailscanner_23.sh: rehash: not found
      ./install_mailscanner_23.sh: /usr/local/bin/sa-update: not found
      Hmm...  Looks like a unified diff to me...
      The text leading up to this was:
      --------------------------
      |--- /usr/local/lib/MailScanner/MailScanner/ConfigDefs.orig.pl  2017-04-17 01:30:06.687969000 +0000
      |+++ /usr/local/lib/MailScanner/MailScanner/ConfigDefs.pl       2017-04-17 01:37:31.896642000 +0000
      --------------------------
      File to patch:
      No file found--skip this patch? [n]
      
      
      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by May 31, 2017, 5:56 PM May 31, 2017, 5:35 PM

        I'll check the install process on a clean vm an fix it. Thanks for the feedback.

        EDIT

        I've found the issue, all repos (including Unofficial) must has Freebsd repo enabled inside it to be able to install Freebsd packages.

        I'm fixing the install script and will push soon.

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

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by May 31, 2017, 6:12 PM

          Re-run the install process, pkg install should be fixed now.

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

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • R
            Rene.vandenBroek
            last edited by May 31, 2017, 6:25 PM

            Yes, it ran completely this time.

            thank you.

            1 Reply Last reply Reply Quote 0
            • P
              pyrodex
              last edited by Jun 4, 2017, 3:15 PM

              Just setup this with an AWS SES setup for mail relay and I notice I am dropping mail with the following issue in the logs:

              
              Jun  4 11:13:32 firewall postfix/smtpd[62200]: connect from beast-areca.localhome.com[192.168.XX.XX]
              Jun  4 11:14:02 firewall postfix/smtpd[62200]: warning: connect to Milter service inet:localhost:8893: Operation timed out
              
              

              Any ideas?

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by Jun 4, 2017, 4:00 PM

                There are services not running. Check all milters enabled, opendkim, spf, etc..

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

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • R
                  Rene.vandenBroek
                  last edited by Jun 4, 2017, 4:53 PM

                  A few posts back I had some problems with installing the postfix and mailscanner packages. As a result some of the permissions / ownerships were not set correctly and the DKIM and SPF milter failed to install correctly.
                  I've set the ownership to the postfix and mailscanner folders (/incoming ..etc) to user postfix so the temporary databases and incoming folders could be made ( my mails were stuck in the "on hold" queue)

                  I've then re-installed the CPAN modules as noted in the mailscanner package , and afterwards installed the failed modules with the command;

                  perl -MCPAN -e "install Mail::DKIM"
                  (source https://forum.ivorde.com/spamassassin-sa-update-complains-about-not-installed-modules-t32.html

                  Replace the packagename where required offcourse.

                  It might not be the same problem as I had, but maybe it helps you.

                  1 Reply Last reply Reply Quote 0
                  • 23 days later
                  • I
                    Igor Filth
                    last edited by Jun 27, 2017, 2:29 PM

                    Hi, marcelloc! I think I found some minor bugs

                    1. Auto whitelist doesn't work until I created manually «postscreen_spf_whitelist.cidr» file

                    2. When I try to watch postfix configuration files «relay_recipients» I see blank page.

                    Recipients.JPG_thumb
                    Recipients.JPG

                    1 Reply Last reply Reply Quote 0
                    • BismarckB
                      Bismarck
                      last edited by Jun 27, 2017, 3:17 PM

                      @Igor:

                      1. When I try to watch postfix configuration files «relay_recipients» I see blank page.

                      You can see this only, if you have  "Enable LDAP/URL fetch" ind the Recipients tab enabled.

                      1 Reply Last reply Reply Quote 0
                      • I
                        Igor Filth
                        last edited by Jun 27, 2017, 5:52 PM

                        Bismarck, "Enable LDAP/URL fetch" is already enabled, file "relay_recipients" contains 248 emails.

                        1 Reply Last reply Reply Quote 0
                        • BismarckB
                          Bismarck
                          last edited by Jun 27, 2017, 6:20 PM

                          @Igor:

                          Bismarck, "Enable LDAP/URL fetch" is already enabled, file "relay_recipients" contains 248 emails.

                          Mine is just working fine with aprox 750 lines, maybe you could have a look in /usr/local/www/postfix_view_config.php around line 33

                                  		'recipients'=> POSTFIX_LOCALBASE . "/etc/postfix/relay_recipients",
                          

                          and check the paths etc. the code is pretty self explained.

                          1 Reply Last reply Reply Quote 0
                          • I
                            Igor Filth
                            last edited by Jun 27, 2017, 7:10 PM

                            Yeah, I found mistake.

                            Line 33 in my postfix_view_config.php is right
                            But line 99```

                            • relay_recipients
                            
                            Should be```
                            *   [relay_recipients](#)
                            

                            Not "relay", but "recipients"  ;)

                            1 Reply Last reply Reply Quote 0
                            • marcellocM
                              marcelloc
                              last edited by Jun 27, 2017, 7:31 PM

                              @Igor:

                              Yeah, I found mistake.

                              This way?

                              https://github.com/marcelloc/Unofficial-pfSense-packages/commit/833483889f73243affe6ba71ce4465bf3f325dec

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

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • I
                                Igor Filth
                                last edited by Jun 27, 2017, 8:24 PM Jun 27, 2017, 8:07 PM

                                This way?

                                https://github.com/marcelloc/Unofficial-pfSense-packages/commit/833483889f73243affe6ba71ce4465bf3f325dec

                                Yes

                                What can i say about

                                1)  Auto whitelist doesn't work until I created manually «postscreen_spf_whitelist.cidr» file

                                I'm delete «postscreen_spf_whitelist.cidr» file, and start test again.
                                Domains in file "auto_whitelisted_domains" and CIDR in "auto_whitelisted_cidr" created automatically (previously has been the same), but recipients has not received emails (stasus "soft bounce") from this domains again.

                                I swapped the lines "cidr:/usr/local/etc/postfix/auto_whitelisted_cidr" and "cidr:/usr/local/etc/postfix/postscreen_spf_whitelist.cidr" in my "main.cf" (without creating file "postscreen_spf_whitelist.cidr")

                                postscreen_access_list = permit_mynetworks,
                                			cidr:/usr/local/etc/postfix/cal_cidr,
                                			cidr:/usr/local/etc/postfix/auto_whitelisted_cidr,
                                			cidr:/usr/local/etc/postfix/postscreen_spf_whitelist.cidr
                                
                                

                                And now all emails were delivered to recipients, auto whitelisting works fine.

                                1 Reply Last reply Reply Quote 0
                                • about a month later
                                • R
                                  Rene.vandenBroek
                                  last edited by Aug 4, 2017, 4:38 AM

                                  Hi Marcelloc,

                                  it appears that the FreeBSD repo has upgraded the MailScanner pkg to version 5.0.3 ( from 4.85.2 ). Unfortunately this breaks the mailscanner functionality. Since i'm not very good (i've actualy got no clue at all) in tracing back all the possible issues in the new package I thought I'd let you know.

                                  I only saw it removes (or doesn't create) the file /usr/local/sbin/mailscanner .

                                  fo now I've just downloaded the former package from http://pkg.freebsd.org/FreeBSD:11:amd64/release_0/All/MailScanner-4.85.2.txz and installed that on top of the 5.0.3 version, and that restores the mailscanner functionality.

                                  1 Reply Last reply Reply Quote 0
                                  • marcellocM
                                    marcelloc
                                    last edited by Aug 4, 2017, 7:47 PM

                                    @Rene.vandenBroek:

                                    it appears that the FreeBSD repo has upgraded the MailScanner pkg to version 5.0.3 ( from 4.85.2 ). Unfortunately this breaks the mailscanner functionality. Since i'm not very good (i've actualy got no clue at all) in tracing back all the possible issues in the new package I thought I'd let you know.

                                    Need some changed, I've already did some but it still have other things to fix.

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

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • 2 months later
                                    • R
                                      ralf.kirmis
                                      last edited by Sep 28, 2017, 6:59 AM

                                      Good Morning,

                                      has somebody tested the postfix installer script on the 2.4 RC Version?
                                      Just to be ready when the 2.4 is released.  ::)

                                      regards,
                                      Ralf

                                      1 Reply Last reply Reply Quote 0
                                      • I
                                        Igor Filth
                                        last edited by Oct 4, 2017, 6:53 AM

                                        +1)
                                        Postfix is one of most important packages for me. I hope to see it on version 2.4  ::)

                                        1 Reply Last reply Reply Quote 0
                                        • about a month later
                                        • P
                                          pf-disa
                                          last edited by Nov 3, 2017, 6:44 PM Nov 3, 2017, 6:05 PM

                                          Hi Marcelloc,

                                          first of all thank you for your great work…

                                          While waiting for the package for 2.4 ;) I've upgraded pfSense to version 2.3.5 but postfix doesn't start, with the following message in the log:

                                          
                                          Nov 3 18:41:51 	php-fpm 	70404 	/pkg_edit.php: Postfix setup completed
                                          Nov 3 18:41:51 	php-fpm 	70404 	/pkg_edit.php: Reloading/starting postfix
                                          Nov 3 18:41:50 	php-fpm 	70404 	/pkg_edit.php: Writing rc_file
                                          Nov 3 18:41:50 	php-fpm 	70404 	/pkg_edit.php: The command '/usr/local/sbin/postmap /usr/local/etc/postfix/sender_access' returned exit code '1', the output was 'Shared object "libicuuc.so.58" not found, required by "postmap"'
                                          Nov 3 18:41:50 	php-fpm 	70404 	/pkg_edit.php: The command '/usr/local/sbin/postmap /usr/local/etc/postfix/transport' returned exit code '1', the output was 'Shared object "libicuuc.so.58" not found, required by "postmap"'
                                          Nov 3 18:41:50 	php-fpm 	70404 	/pkg_edit.php: Writing out configuration 
                                          
                                          

                                          What can I try?

                                          Thanks…
                                          R.

                                          Update: after a couple of reboot and a reinstallation now postfix starts and works correctly...
                                          I'll wait for the 2.4 version of the script... Thanks!

                                          1 Reply Last reply Reply Quote 0
                                          • marcellocM
                                            marcelloc
                                            last edited by Nov 6, 2017, 5:00 PM

                                            @pf-disa:

                                            What can I try?

                                            Try to reinstall the package. It's missing some libs from freebsd.

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

                                            Help a community developer! ;D

                                            W 1 Reply Last reply Nov 28, 2018, 1:44 AM Reply Quote 0
                                            • BismarckB
                                              Bismarck
                                              last edited by Nov 12, 2017, 8:29 AM

                                              @marcelloc:

                                              @pf-disa:

                                              What can I try?

                                              Try to reinstall the package. It's missing some libs from freebsd.

                                              After update from 2.3.4 to 2.3.5, postfix need to be reinstalled:

                                              pkg install postfix
                                              

                                              or

                                              pkg install postfix-sasl
                                              

                                              will fix the missing libs, and postfix is operation normal again.

                                              1 Reply Last reply Reply Quote 0
                                              • 8 days later
                                              • I
                                                Igor Filth
                                                last edited by Nov 19, 2017, 8:51 PM

                                                Hi! I installed postfix on my pf 2.4.1 with marcelloc script.

                                                I changed "2.3" to "2.4" at line 25 and run script, but packages was not found in repos.

                                                I unlock the FreeBSD repo in

                                                /usr/local/etc/pkg/repos/FreeBSD.conf > enabled: yes

                                                /usr/local/etc/pkg/repos/pfSense.conf > enabled: yes

                                                Then create xmlrpc.inc, because postfix.inc requires it

                                                touch /etc/inc/xmlrpc.inc

                                                I run script again, but have error "postwhite.conf not found"

                                                I do action from this post

                                                https://forum.pfsense.org/index.php?topic=40622.msg710038#msg710038

                                                and run srcipt again.

                                                In the end i have this error:

                                                updating soft bounce message status on databases..
                                                /var/db/postfix/20*dbError: near line 1: no such table: mail_noqueue
                                                ok

                                                I think it's not good, but postfix work fine. Massages transfered to my Exchange server, soft bounce work too.  ;)

                                                1 Reply Last reply Reply Quote 0
                                                • about a year later
                                                • W
                                                  winsonfa @marcelloc
                                                  last edited by Nov 28, 2018, 1:44 AM

                                                  @marcelloc Hi Marcello Hola Marcelloc, i just install pfsense 2.3.5 and postfix forwarder from your script, i can watch and edit postfix menu in pfsense but postfix no start, even pfsense no has the postfix command, i've tried to reinstall postfix from unofficial repo but got errors.
                                                  🔒 Log in to view

                                                  please help

                                                  W 1 Reply Last reply Nov 28, 2018, 2:21 AM Reply Quote 0
                                                  • W
                                                    winsonfa @winsonfa
                                                    last edited by Nov 28, 2018, 2:21 AM

                                                    @winsonfa 🔒 Log in to view unofficial repo no found postfix packets

                                                    1 Reply Last reply Reply Quote 0
                                                    • BismarckB
                                                      Bismarck
                                                      last edited by Nov 28, 2018, 5:26 AM

                                                      Hi winsonfa, you can try my modded script for pfSense 2.4:

                                                      cd /root
                                                      
                                                      https://raw.githubusercontent.com/spec1re/stuff/master/install_postfix_24.sh
                                                      
                                                      sh ./install_postfix_24.sh
                                                      

                                                      and here for MailScanner:

                                                      cd /root
                                                      
                                                      https://raw.githubusercontent.com/spec1re/stuff/master/install_mailscanner_24.sh
                                                      
                                                      sh ./install_mailscanner_24.sh
                                                      

                                                      Both did work fine here with pfSense 2.4.3.

                                                      W 1 Reply Last reply Nov 28, 2018, 4:53 PM Reply Quote 0
                                                      • W
                                                        winsonfa @Bismarck
                                                        last edited by Nov 28, 2018, 4:53 PM

                                                        @bismarck said in Postfix - antispam and relay package:

                                                        install_mailscanner_24.sh

                                                        Hi Bismarck, thanks four your help, your saving my day, i've installed the version 2.4.4, postfix service is running now, when run the mailscanner script i got the following error:

                                                        %(#000000)[fetch: https://github.com/extremeshok/spamassassin-extremeshok_fromreplyto/archive/master.zip: size of remote file is not known
                                                        extremeshok_fromreplyto.zip 9292 B 150 kBps 00m00s
                                                        fetch: https://github.com/smfreegard/DecodeShortURLs/archive/master.zip: size of remote file is not known
                                                        DecodeShortURLs.zip 11 kB 167 kBps 00m00s
                                                        pdfid.zip 100% of 9679 B 859 kBps 00m00s
                                                        fetch: https://github.com/extremeshok/clamav-unofficial-sigs/archive/master.zip: size of remote file is not known
                                                        clamav-unofficial-sigs.zip 76 kB 386 kBps 00m00s
                                                        ./install_mailscanner_24.sh: rehash: not found
                                                        ]

                                                        BismarckB 1 Reply Last reply Nov 28, 2018, 5:14 PM Reply Quote 0
                                                        • BismarckB
                                                          Bismarck @winsonfa
                                                          last edited by Bismarck Nov 28, 2018, 5:26 PM Nov 28, 2018, 5:14 PM

                                                          @winsonfa

                                                          It should still work?

                                                          Those errors are just cosmetic, you can ignore.

                                                          On my machine, it gives that error but still works.

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

                                                          Looks like your connection to Netgate Forum was lost, please wait while we try to reconnect.