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.1m 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.
    • marcellocM
      marcelloc
      last edited by

      Did you tried stopping postfix process and removing current /var/db file to start a new one?

      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

        Thank you marcelloc,after stoping postfix and deleting db file it's ok now,
        I will monitor logs and will inform you if it happens again

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

          Marcello

          It happened again:((

          Jun 29 09:03:51 postfix/postscreen[54318]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable
          Jun 29 09:02:50 postfix/postscreen[61744]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable
          Jun 29 09:01:49 postfix/postscreen[63059]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable

          1 Reply Last reply Reply Quote 0
          • J
            jemarti
            last edited by

            I need to configure PostFix to accept mail from a specific IP address even though that address is both blacklisted and is presenting a non-existent host name during HELO.

            I have tried placing entries like this:
            123.231.132.213 OK
            in the "helo" section of the "Access Lists" tab, and also added them to /usr/local/etc/postfix/helo_check
            but I am still getting the following reject message in the logs:
            RCPT from unknown[123.231.132.213]: 550 5.7.1 Client host rejected: cannot find your hostname, [123.231.132.213]

            Could anyone advise me on the correct way to configure PostFix so that it will bypass the helo and RBL checks for specific IP addresses?

            Thanks.

            1 Reply Last reply Reply Quote 0
            • K
              KriogenBoard
              last edited by

              Hi guys! Sorry for my bad English. I found an interesting bug. The package is sensitive to the hostname. If you do not correct the host name does not occur the record in db file. Example: mail1.example.com working, mail-1.example.com not working. All the matter in the function function_grep_log in file /usr/local/www/postfix.php . Please note this bug in the next update. Thank you.  :)

              1 Reply Last reply Reply Quote 0
              • K
                kwaci
                last edited by

                Hi All,

                Im new in this forum. Im just installing pfSense with Postfix and Mailscanner package as SMTP relay for our Exchange 2003 server.
                It work very well. Postscreen and RBL checks are the day saver.  :)

                One thing i want to ask, is it possible to block certain email  address from my trusted (mynetworks) SMTP client ?

                I had put the email address in the Access List –> Sender, but it doestnt have any effect. I think it is because the order in the **_smtpd_client_restrictions_** and _**smtpd_recipient_restrictions**_ started by **_permit_mynetworks_** and followed by other rules. So if the first rule is passed, it wont check the following rules.
                Also im trying to change the order from the shell, but when im reload the Postfix from the GUI the main.cf back to default order.

                smtpd_recipient_restrictions = permit_mynetworks,
                reject_unauth_destination,
                reject_unauth_pipelining,
                check_client_access pcre:/usr/local/etc/postfix/cal_pcre,
                check_client_access cidr:/usr/local/etc/postfix/cal_cidr,
                check_sender_access hash:/usr/local/etc/postfix/sender_access,
                reject_non_fqdn_helo_hostname,
                reject_unknown_recipient_domain,
                reject_non_fqdn_recipient,
                reject_multi_recipient_bounce,
                reject_unverified_recipient,
                reject_spf_invalid_sender,
                permit

                Thank you

                SMTPD_SENDER.jpg
                SMTPD_SENDER.jpg_thumb

                1 Reply Last reply Reply Quote 0
                • K
                  kwaci
                  last edited by

                  @expert_az:

                  Marcello

                  It happened again:((

                  Jun 29 09:03:51 postfix/postscreen[54318]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable
                  Jun 29 09:02:50 postfix/postscreen[61744]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable
                  Jun 29 09:01:49 postfix/postscreen[63059]: fatal: btree:/var/db/postfix/postscreen_cache: unable to get exclusive lock: Resource temporarily unavailable

                  Hi expert_az,

                  I think you have configured the Postfix to listen on multiple interfaces.
                  You can workaround this issue by listening postfix on localhost only and then nat external ips to 127.0.0.1. (http://forum.pfsense.org/index.php/topic,46334.msg242753.html#msg242753)

                  Listen_Loopback_Only.jpg
                  Listen_Loopback_Only.jpg_thumb
                  NAT_to_Loopback.jpg
                  NAT_to_Loopback.jpg_thumb

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

                    kwaci thank you for reply,i will try solution

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

                      hello marcelloc,after upgrade version 2.10.0 pkg v.2.3.5 all queued mails in Search Mail tab displayed as hold(status) mail.

                      but some of theme have  sent,spam or  hold  status,anyway to correct this issue?

                      1 Reply Last reply Reply Quote 0
                      • F
                        FlashPan
                        last edited by

                        Hi all,

                        I seem to having a little issue with the widget for this package.

                        Emails are flowing in and out fine but the widget does not show the number of emials which have been rejected etc.

                        The only disply the widget shows is the number of "Sent" emails which are emails that have passed through successfully and allowed into my exchange server.

                        I am not using the additional mailscanner and I am running pfsense 2.0.3 i386 and postfix forwarder 2.10.0 pkg v.2.3.5

                        Any ideas or tweaks I need to make?

                        Thanks and cheers all.

                        1 Reply Last reply Reply Quote 0
                        • K
                          kwaci
                          last edited by

                          @jemarti:

                          I need to configure PostFix to accept mail from a specific IP address even though that address is both blacklisted and is presenting a non-existent host name during HELO.

                          I have tried placing entries like this:
                          123.231.132.213 OK
                          in the "helo" section of the "Access Lists" tab, and also added them to /usr/local/etc/postfix/helo_check
                          but I am still getting the following reject message in the logs:
                          RCPT from unknown[123.231.132.213]: 550 5.7.1 Client host rejected: cannot find your hostname, [123.231.132.213]

                          Could anyone advise me on the correct way to configure PostFix so that it will bypass the helo and RBL checks for specific IP addresses?

                          Thanks.

                          Hi jemarti, try to put it in the Access List –> MyNetworks.

                          MyNetworks.jpg
                          MyNetworks.jpg_thumb

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

                            Jemarti,

                            you can add that IP to mynetworks but it would be far better to email the owner of 123.231.132.213 and ask him to fix his DNS entries so that IP address resolves to the host name sent in the HELO/EHLO command.

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

                              Hi

                              My postfix db /var/db/postfix takes a huge space. I would like to purge postfix sqlite files.
                              Can I just remove old files ?

                              1 Reply Last reply Reply Quote 0
                              • D
                                doktornotor Banned
                                last edited by

                                @ics:

                                My postfix db /var/db/postfix takes a huge space. I would like to purge postfix sqlite files.
                                Can I just remove old files ?

                                Uhm, how about

                                sqlite3 database_name "VACUUM;"
                                
                                1 Reply Last reply Reply Quote 0
                                • I
                                  ics
                                  last edited by

                                  I don't know the database_name…
                                  FYI, the folder contents many files [date].db

                                  Also, as I understand, this command will reclaim space in the database This will not remove data.
                                  I want to delete old entries.
                                  As it is split in multiple files, would it be possible to keep some of the latest .db files and delete the oldest ones ?

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    doktornotor Banned
                                    last edited by

                                    @ics:

                                    I don't know the database_name…

                                    Eh. It's the filename.

                                    @ics:

                                    Also, as I understand, this command will reclaim space in the database This will not remove data.

                                    Yes.

                                    @ics:

                                    I want to delete old entries.

                                    So delete them?

                                    @ics:

                                    As it is split in multiple files, would it be possible to keep some of the latest .db files and delete the oldest ones ?

                                    Yes, of course. man find

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

                                      This might be off topic but I'm using this package to relay mail into and then outside of my network both using ipv4 and ipv6. I was wondering if there would be a way to change the webgui config's logic so that if you do not select an interface to listen to it would essentially populate the master.cf using one smtp service entry in the master.cf

                                      ie:
                                      smtp      inet  n      -      n      -      1      postscreen

                                      I think technically using postscreen for inbound traffic & relaying outbound is not the correct method to implement but with my tiny MX environment I feel it's not an issue.

                                      My setup also has the custom main.cf rules form filled in with the following also…

                                      relayhost = [smtp.somewhere.net]
                                      inet_protocols = all
                                      inet_interfaces = 127.0.0.1, [::1], 192.168.1.254, [fd00:470:bce0:1::254]
                                      smtp_bind_address = 0.0.0.0
                                      smtp_bind_address6 = fd00:470:bce0:1::254

                                      Every time I update to a recent snapshot it seems that I've had to resave all settings in the webgui, then hand tune the master.cf,  copy it and the rest of the /usr/local/etc/postfix/* configs over to the /usr/pbi/postfix-i386/etc/postfix dir. I essentially came to all of these a good while back when I moved from the stable release to a snapshot build and discovered everything was horridly broke…. :-)

                                      My question now is basically, are there any plans to make this a bit more ipv6 friendly? and could I get some thoughts on the postscreen for in/out relaying as well? Perhaps there is some future changes that will ease my frustrations and/or I'm all for even assisting in the creation any changes.

                                      Cheers,
                                      Brian

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        Truster
                                        last edited by

                                        Hello Marcelloc, nice to see you again in another thread :-)

                                        i have a little question about the postfix forwarder package, i'm getting the errro:

                                        postfix/postfix-script[21723]: fatal: the Postfix mail system is not running
                                        

                                        And another one: the file /usr/local/etc/rc.d/postfix.sh isn't executable, is this correct?

                                        Best regards from Salzburg
                                        Dave

                                        Edit: Running on pfsense 2.0.2 i386, i'll upgrade it today at 12:00 CEST to the latest version

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          Truster
                                          last edited by

                                          Truster, you are the greatest noop on this planet: check "Enable Postfix"-checkbox and get lucky.  ;D

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            aslan1071
                                            last edited by

                                            Quick question. I hope it has not been covered and I missed it I am sorry as am new to this tool. I have several Cpanel Boxes with several hundred domains on each that I would like to use this for. The Problem comes when I try to add more then 98 domains to the forwarding table it stops adding them. Is this a limit of postfix or pfSense? Please advise.

                                            thanks

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