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

    Postfix - antispam and relay package

    Scheduled Pinned Locked Moved pfSense Packages
    855 Posts 136 Posters 1.2m 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.
    • N
      n3by
      last edited by

      Thank you but is exactly the same as before.
      I can live without postwhite and widget as before…

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

        @ecfx:

        Thank you but is exactly the same as before.
        I can live without postwhite and widget as before…

        fixed postwhite config file creation and etc path call

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

        Help a community developer! ;D

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

          Thanks, the widget shortcuts are handy.  :)

          1 Reply Last reply Reply Quote 0
          • I
            Igor Filth
            last edited by

            Can I run "install_postfix_23.sh" script again or I must remove all installed packages first  ::)

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

              @Igor:

              Can I run "install_postfix_23.sh" script again or I must remove all installed packages first  ::)

              As far as I can see, it should not be a issue, just run the script again.

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

                Included postfwd functions to limit messages per user and time based on package.

                To use this funcion you must run the install cpan modules script from pkg-mailscanner

                https://raw.githubusercontent.com/marcelloc/Unofficial-pfSense-packages/master/pkg-mailscanner/files/install_cpan_modules_23.sh

                Fist time implementation, not used to run postfwd, so feedbacks are always welcome.

                postfwd.PNG
                postfwd.PNG_thumb

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

                Help a community developer! ;D

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

                  @marcelloc:

                  @Bismarck:

                  Yes, but it looks like the widget just counts high scored spam and not all, same when searching for spam in postfix_search.php it just finds high scored spam and the numbers of high scored spam are are always the same in the widget and MailMatch.

                  The point is that database gets the last status from message. 'Normal spam' on your configuration are sent to user, this way, last state is sent, instead of spam.

                  I've pushed a commit that updates the status only when it's not a spam message
                  https://github.com/marcelloc/Unofficial-pfSense-packages/commit/d6dcd6d63ae83886aa9da00f545137fa2cd6b046

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

                  Help a community developer! ;D

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

                    Also, I've include 7zip, rar and PDFID patch to mailscanner package, just re-run  install to get latest updates.

                    Thanks for  Bismarck and danny at tweegy.nl  8)

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

                    Help a community developer! ;D

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

                      Thanks, I'm not at the office at the moment, will check it out when back.  8)

                      1 Reply Last reply Reply Quote 0
                      • B
                        Bigdaddy168
                        last edited by

                        Hey guys, would it be possible to include a pop3 connector like fetchmail or getmail?

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

                          @Bigdaddy168:

                          Hey guys, would it be possible to include a pop3 connector like fetchmail or getmail?

                          There was a package for it(p3scan) but it's too old and abandoned http://p3scan.sourceforge.net

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

                          Help a community developer! ;D

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

                            updated but now have two 'Mailscanner' Service menu items… Looks like the check_mailscanner_service.php is looking for menu item 'mailscanner' not 'Mailscanner'...

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

                              @danjeman:

                              updated but now have two 'Mailscanner' Service menu items… Looks like the check_mailscanner_service.php is looking for menu item 'mailscanner' not 'Mailscanner'...

                              Thanks for the feedback. I'll fix it.

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

                              Help a community developer! ;D

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

                                Was not getting any sqllite db's from the logs despite all settings being correct then found an old post referencing an issue if you have other characters in the hostname (- for instance which I do). So took a look at postfix.php and updated the regex match looking for date and hostname from:
                                preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+))….. to
                                preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+([.-]?\w+))….... and voilla now have widget and search logs available...

                                Will verify stats are valid but looks good so far  :)

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

                                  I think I am in the same situation as I have some hosts and email addresses that contain " - " and widget is not updating.

                                  Can you please be more specific where in the file and what to change/patch as searching for

                                  preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+)
                                  ```=```
                                  preg_match("/(\\w+\\s+\\d+\\s+[0-9,:]+) (\\w+)
                                  ```find many instances of that code.
                                  
                                  Please use "Insert Code" to preserve the format.
                                  
                                  thank you.
                                  1 Reply Last reply Reply Quote 0
                                  • marcellocM
                                    marcelloc
                                    last edited by

                                    @ecfx:

                                    Can you please be more specific where in the file and what to change/patch.

                                    At the beginning of every log pregmatch under /usr/local/www/postfix.php

                                    I'll modify it to get hostname from system or xml

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

                                    Help a community developer! ;D

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

                                      This is just for matching the system hostname from the log…

                                      There are 10 instances of that code at lines 253, 263, 275, 284, 295, 300, 305, 309, 319 and 357. Each one is parsing for a particular process log (postfix/smtpd, Mailscanner etc)

                                      Replace

                                      preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+)
                                      

                                      with

                                      preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+([\.-]?\w+))
                                      

                                      There's probably a neater way to get the hostname but this does the job for my case at least.

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

                                        Thank you now is clear, patched.

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

                                          Ok so widget crashed now due to memory allocation error… also not seeing any sent mails being logged but that could be configuration error (or will it not log those?)...

                                          
                                          					Crash report begins.  Anonymous machine information:
                                          
                                          amd64
                                          10.3-RELEASE-p17
                                          FreeBSD 10.3-RELEASE-p17 #10 6da131e75c7(RELENG_2_3_3): Wed Mar  8 14:24:33 CST 2017     root@ce23-amd64-builder:/builder/pfsense-233/tmp/obj/builder/pfsense-233/tmp/FreeBSD-src/sys/pfSense
                                          
                                          Crash report details:
                                          
                                          PHP Errors:
                                          [19-Apr-2017 12:47:34 Europe/London] PHP Fatal error:  Allowed memory size of 262144000 bytes exhausted (tried to allocate 1262797654 bytes) in 
                                          
                                          /usr/local/www/widgets/widgets/postfix.widget.php on line 146
                                          [19-Apr-2017 12:47:34 Europe/London] PHP Stack trace:
                                          [19-Apr-2017 12:47:34 Europe/London] PHP   1\. {main}() /usr/local/www/index.php:0
                                          [19-Apr-2017 12:47:34 Europe/London] PHP   2\. include_once() /usr/local/www/index.php:438
                                          [19-Apr-2017 12:48:41 Europe/London] PHP Fatal error:  Allowed memory size of 262144000 bytes exhausted (tried to allocate 1262797654 bytes) in /usr/local/www/widgets/widgets/postfix.widget.php on line 146
                                          [19-Apr-2017 12:48:41 Europe/London] PHP Stack trace:
                                          [19-Apr-2017 12:48:41 Europe/London] PHP   1\. {main}() /usr/local/www/index.php:0
                                          [19-Apr-2017 12:48:41 Europe/London] PHP   2\. include_once() /usr/local/www/index.php:438
                                          
                                          Filename: /var/crash/minfree
                                          2048
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • marcellocM
                                            marcelloc
                                            last edited by

                                            What is the max file size you configured for widget?

                                            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.