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

    PFSENSE acting like an antispam gateway with postfix forwarder

    Scheduled Pinned Locked Moved pfSense Packages
    11 Posts 3 Posters 5.8k 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.
    • J Offline
      JJYVON
      last edited by

      I need to replace a Esafe anti spam server and a Checkpoint server
      I Think pfSENSE can do the work with postfix forwarder and squid guard of this 2 two server in one box.

      The first step of the deployment is to remove Esafe and i have set a pfSENSE like this

      On a VMWARE ESXI, 5.0 server

      • I have installed PFsense 2.1.2-RELEASE (amd64)

      • I have setup a wan interface on my network

      • IP : 192.168.1.76/24

      • Gateway : 192.168.10.254 (CISCO ASA505)

      • I have setup  a lan Interface also on my network

      • IP : 192.168.1.77/24

      • No gateway

      • On my cisco i redirect my public IP address to the wan interface

      • On pfSENSE i have created a nat to the localhost for the port 25

      • I have installed Postfix Forwarder 2.10.2 pkg v.2.3.7 and setup Postfix Forwarder like this :

      • In general tab :

      • Postfix General Settings

      • Listen Protocol : ipv4

      • Listen on : loopback

      • Logging

      • Destination : /var/log/maillog

      • Update Sqlite : Every minute

      • In domains tab

      • Domains to forward

      • domain : dis-info.com

      • Mail server ip :  (my exchange server)

      • In Access Lists TAB

      • Filter while receiving mail

      • header : /^Subject:/ WARN

      • Client Access List

      • MyNetworks : ip address of my own workstation

      • In the Antispam tab

      • Postfix Antispam Settings

      • Header verification : basic

      • Helo Hostname : unchecked

      • Zombie blocker : enabled with enforce

      • After gretting tests : All options selected

      • Third part Antispam Settings

      • Use Third par antispam : unchecked

      maillog.txt

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

        @JJYVON:

        Search mail function work like a quarantine ?

        No. It just shows maillog stored on databases with search fields

        try to run database cmd on console to see if it returns an error.

        /usr/local/bin/php -q /usr/local/www/postfix.php 01min

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

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • J Offline
          JJYVON
          last edited by

          @marcelloc:

          No. It just shows maillog stored on databases with search fields

          Do you know if i can hold a message limited time, and let him pass if it'is a good one ?

          @marcelloc:

          try to run database cmd on console to see if it returns an error.
          /usr/local/bin/php -q /usr/local/www/postfix.php 01min

          I have run the command in the shell and i have this in the output

          /usr/bin/grep '^Apr 24 09:18.*\(MailScanner\|postfix.cleanup\|postfix.smtp\|postfix.error\|postfix.qmgr\)' /var/log/maillog
          writing to database...writing to database...
          
          

          In search mail i enter this

          • in from : *

          • To: *

          • Subject : *

          • Message Status : any

          • Log type : Queue

          • Sqlite files: 2014-04-23

          • Message Fields : i select all field

          then i click on search
          and the search result is empty

          Thanks for your help marcelloc

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

            @JJYVON:

            Do you know if i can hold a message limited time, and let him pass if it'is a good one ?

            That's what mailscanner does

            @JJYVON:

            In search mail i enter this

            • in from : *

            • To: *

            • Subject : *

            • Message Status : any

            • Log type : Queue

            • Sqlite files: 2014-04-23

            • Message Fields : i select all field

            check Noqueue log type

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

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • J Offline
              JJYVON
              last edited by

              I will install mailscanner when Postfix works fine, thanks for the advice.

              I have check log type : No Queue

              And it's empty to.  :(

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

                I'll test it here on pfsense 2.1.2

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

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • J Offline
                  JJYVON
                  last edited by

                  Hi marcelloc,

                  I have reinstalled postfix forwarder on a pfsense 2.1.2 i386 and it work fine !

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mizu.icehealer
                    last edited by

                    @JJYVON:

                    I will install mailscanner when Postfix works fine, thanks for the advice.

                    I have check log type : No Queue

                    And it's empty to.  :(

                    Hi Marcelloc,

                    I have this issue too, there is nothing in search mail  :(
                    I have selecet all sqlite database, but it still empty (0 result)

                    And so does "Queue" tab, there is always 0 result when I search
                    Please help me. .

                    Thanks,

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      JJYVON
                      last edited by

                      Hi MIZU,

                      For me this issue was due to the name of my PFSense server. some character don't work with log.

                      Sorry for my bad english.

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mizu.icehealer
                        last edited by

                        @JJYVON:

                        Hi MIZU,

                        For me this issue was due to the name of my PFSense server. some character don't work with log.

                        Sorry for my bad english.

                        Hi JJYVON,
                        Thanks for reply

                        Did u mean the hostname of the PfSense Server? (on System -> General Setup right?)
                        Can u give me an example the good name for PfSense Server? my PfSense server name is bss-pfs

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          JJYVON
                          last edited by

                          Yes i mean  the hostname of pfSense Server.
                          a good hostname is without any character other than letter or number.
                          bss-pfs : Don't work.
                          bsspfs : while work.

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