Loading ...
Sorry, an error occurred while loading the content.

postfix / check_client_access on mac

Expand Messages
  • Evan Platt
    Hello all.. running postfix 2.2.4 on Mac OS/X.. In my main.cf, I ve added check_client_access hash:/etc/postfix/rbl_access, created a rbl_access file which
    Message 1 of 16 , Apr 28 11:29 AM
    • 0 Attachment
      Hello all.. running postfix 2.2.4 on Mac OS/X.. In my main.cf, I've added
      check_client_access hash:/etc/postfix/rbl_access,
      created a rbl_access file which consists of:
      66.94.237.26 OK
      .dcn.yahoo.com OK
      .scd.yahoo.com OK
      .mud.yahoo.com OK

      I then postmap hash:/etc/postfix/rbl_access .

      postconf -n shows:
      command_directory = /sw/sbin
      config_directory = /sw/etc/postfix
      daemon_directory = /sw/lib/postfix
      debug_peer_level = 2
      html_directory = /sw/share/doc/postfix-mysql-tls/html
      inet_interfaces = localhost
      mail_owner = postfix
      mailq_path = /sw/bin/mailq
      manpage_directory = /sw/share/man
      mynetworks_style = host
      newaliases_path = /sw/bin/newaliases
      queue_directory = /sw/var/spool/postfix
      readme_directory = /sw/share/doc/postfix-mysql-tls/README_FILES
      sample_directory = /sw/etc/postfix
      sendmail_path = /sw/sbin/sendmail
      setgid_group = postdrop
      unknown_local_recipient_reject_code = 550

      If I then restart postfix, my maillog shows:

      Apr 28 10:00:28 www postfix/smtpd[7612]: fatal: open database
      /etc/postfix/rbl_access.db: Inappropriate file type or format
      Apr 28 10:00:29 www postfix/master[56]: warning: process
      /usr/libexec/postfix/smtpd pid 7612 exit status 1
      Apr 28 10:00:29 www postfix/master[56]: warning:
      /usr/libexec/postfix/smtpd: bad command startup -- throttling

      I'd be glad to post the .db file on my web site if that would help..

      Any help appreciated.

      Thanks.
    • Noel Jones
      ... I see no evidence of check_client_access in the posted configuration. Also note that the correct syntax for your map would be scd.yahoo.com OK (no
      Message 2 of 16 , Apr 28 12:14 PM
      • 0 Attachment
        At 01:29 PM 4/28/2006, Evan Platt wrote:
        >Hello all.. running postfix 2.2.4 on Mac OS/X.. In my
        >main.cf, I've added
        >check_client_access hash:/etc/postfix/rbl_access,
        >created a rbl_access file which consists of:
        >66.94.237.26 OK
        >.dcn.yahoo.com OK
        >.scd.yahoo.com OK
        >.mud.yahoo.com OK
        >
        >I then postmap hash:/etc/postfix/rbl_access .
        >
        >postconf -n shows:
        >command_directory = /sw/sbin
        >config_directory = /sw/etc/postfix
        >daemon_directory = /sw/lib/postfix
        >debug_peer_level = 2
        >html_directory = /sw/share/doc/postfix-mysql-tls/html
        >inet_interfaces = localhost
        >mail_owner = postfix
        >mailq_path = /sw/bin/mailq
        >manpage_directory = /sw/share/man
        >mynetworks_style = host
        >newaliases_path = /sw/bin/newaliases
        >queue_directory = /sw/var/spool/postfix
        >readme_directory = /sw/share/doc/postfix-mysql-tls/README_FILES
        >sample_directory = /sw/etc/postfix
        >sendmail_path = /sw/sbin/sendmail
        >setgid_group = postdrop
        >unknown_local_recipient_reject_code = 550

        I see no evidence of check_client_access in the posted
        configuration.
        Also note that the correct syntax for your map would be
        scd.yahoo.com OK (no leading ".")
        unless you change the default value of
        parent_domain_matches_subdomain

        >If I then restart postfix, my maillog shows:
        >
        >Apr 28 10:00:28 www postfix/smtpd[7612]: fatal: open database
        >/etc/postfix/rbl_access.db: Inappropriate file type or format
        >Apr 28 10:00:29 www postfix/master[56]: warning: process
        >/usr/libexec/postfix/smtpd pid 7612 exit status 1
        >Apr 28 10:00:29 www postfix/master[56]: warning:
        >/usr/libexec/postfix/smtpd: bad command startup -- throttling

        sounds as if you either have multiple copies of postfix
        built with different DB libraries, or somehow managed to
        get different libraries into different parts of
        postfix. Did you build once by hand and then again using ports?

        find / -name postmap -print

        --
        Noel Jones
      • Evan Platt
        ... Hmm.. It clearly runs - as soon as I make the change. I don t need to restart postfix or anything. As a matter of fact, if I try to postfix restart or
        Message 3 of 16 , Apr 28 12:43 PM
        • 0 Attachment
          On Fri, April 28, 2006 12:14 pm, Noel Jones wrote:

          > I see no evidence of check_client_access in the posted
          > configuration.

          Hmm.. It clearly runs - as soon as I make the change. I don't need to
          restart postfix or anything. As a matter of fact, if I try to postfix
          restart or stop, I'm told it's not running. If I postfix start, I get a
          screen full of errors about queued messages.

          > Also note that the correct syntax for your map would be
          > scd.yahoo.com OK (no leading ".")
          > unless you change the default value of
          > parent_domain_matches_subdomain

          I don't have that entry at all in my main.cf, but it is in main.cf.default
          . I take it the proper format would be
          parent_domain_matches_subdomains = rbl_access ?

          > sounds as if you either have multiple copies of postfix
          > built with different DB libraries, or somehow managed to
          > get different libraries into different parts of
          > postfix. Did you build once by hand and then again using ports?

          Probably. That's my problem is I'm a novice on this. If there's a easy way
          to make sure I'm just using one (and not loose any config changes, I'm
          open to it..

          > find / -name postmap -print

          /sw/sbin/postmap
          /usr/sbin/postmap

          Looks like I have two.. ?

          Evan
        • Noel Jones
          ... Just noting that the configuration you posted isn t the configuration you complain about. It can be hard to find a solution when the evidence is missing.
          Message 4 of 16 , Apr 28 2:32 PM
          • 0 Attachment
            At 02:43 PM 4/28/2006, Evan Platt wrote:
            >On Fri, April 28, 2006 12:14 pm, Noel Jones wrote:
            >
            > > I see no evidence of check_client_access in the posted
            > > configuration.
            >
            >Hmm.. It clearly runs - as soon as I make the change. I
            >don't need to
            >restart postfix or anything. As a matter of fact, if I try
            >to postfix
            >restart or stop, I'm told it's not running. If I postfix
            >start, I get a
            >screen full of errors about queued messages.

            Just noting that the configuration you posted isn't the
            configuration you complain about. It can be hard to find a
            solution when the evidence is missing.
            It's also possible that the "postconf" command is looking
            at a different main.cf than the one you are editing. This
            would make debugging... tedious.

            > > Also note that the correct syntax for your map would be
            > > scd.yahoo.com OK (no leading ".")
            > > unless you change the default value of
            > > parent_domain_matches_subdomain
            >
            >I don't have that entry at all in my main.cf, but it is in
            >main.cf.default
            >. I take it the proper format would be
            >parent_domain_matches_subdomains = rbl_access ?

            No. Please see
            http://www.postfix.org/postconf.5.html#parent_domain_matches_subdomains
            don't change the it until you understand why you shouldn't.
            Better to change your map.

            Not all 400+ possible entries are in present in the
            distributed main.cf, just the ones commonly used. Oh, and
            never edit main.cf.default.

            > > sounds as if you either have multiple copies of postfix
            > > built with different DB libraries, or somehow managed to
            > > get different libraries into different parts of
            > > postfix. Did you build once by hand and then again
            > using ports?
            >
            >Probably. That's my problem is I'm a novice on this. If
            >there's a easy way
            >to make sure I'm just using one (and not loose any config
            >changes, I'm
            >open to it..
            >
            > > find / -name postmap -print
            >
            >/sw/sbin/postmap
            >/usr/sbin/postmap
            >
            >Looks like I have two.. ?
            >
            >Evan

            You need to track down all remnants of postfix from your
            various experiments and remove them, then reinstall using
            just one method. You can save your existing main.cf for
            use later.
            Maybe a mac-specific list can help with that.

            --
            Noel Jones
          • mouss
            ... That may be your problem. run postconf config_directory This will give you the directory used by default (when you don t use the -c option). now try
            Message 5 of 16 , Apr 28 3:57 PM
            • 0 Attachment
              Evan Platt wrote:
              >> find / -name postmap -print
              >>
              >
              > /sw/sbin/postmap
              > /usr/sbin/postmap
              >
              > Looks like I have two.. ?
              >
              >


              That may be your problem. run
              postconf config_directory
              This will give you the directory used by default (when you don't use the
              -c option).

              now try
              /sw/sbin/postconf config_directory
              and
              /usr/sbin/postconf config_directory

              these should show you the directories used by the different versions.

              do similar things with
              $PATH/postfix mail_version
              to see the postfix versions

              running ldd on the binaries will show which db libs were linked.
            • Evan Platt
              ... This says: config_directory = /sw/etc/postfix ... This says config_directory = /sw/etc/postfix ... Says: config_directory = /etc/postfix ...
              Message 6 of 16 , Apr 29 8:00 AM
              • 0 Attachment
                At 03:57 PM 4/28/2006, mouss wrote:
                >That may be your problem. run
                > postconf config_directory
                >
                >This will give you the directory used by default (when you don't use
                >the -c option).

                This says:
                config_directory = /sw/etc/postfix

                >now try
                > /sw/sbin/postconf config_directory

                This says
                config_directory = /sw/etc/postfix

                >and
                > /usr/sbin/postconf config_directory

                Says:
                config_directory = /etc/postfix

                >these should show you the directories used by the different versions.
                >
                >do similar things with
                > $PATH/postfix mail_version
                >to see the postfix versions

                /sw/etc/postfix mail_version says permission denied - /sw/etc/postfix
                is a directory.

                /usr/sbin/postfix mail_version says
                postfix/postfix-script: fatal: usage: postfix start (or stop, reload,
                abort, flush, check, set-permissions, upgrade-configuration)

                >running ldd on the binaries will show which db libs were linked.

                ldd? I don't have a ldd on my system unless that's a additional piece
                of software.
              • Victor Duchovni
                ... That should have been /sw/sbin/postconf mail_version. ... That should have been /usr/sbin/postconf mail_version. -- Viktor. P.S. Morgan Stanley is looking
                Message 7 of 16 , Apr 29 12:39 PM
                • 0 Attachment
                  On Sat, Apr 29, 2006 at 08:00:08AM -0700, Evan Platt wrote:

                  > /sw/etc/postfix mail_version says permission denied - /sw/etc/postfix
                  > is a directory.

                  That should have been /sw/sbin/postconf mail_version.

                  > /usr/sbin/postfix mail_version says

                  That should have been /usr/sbin/postconf mail_version.

                  --
                  Viktor.

                  P.S. Morgan Stanley is looking for a New York City based, Senior Unix
                  system/email administrator to architect and sustain the Unix email
                  environment. If you are interested, please drop me a note.

                  Disclaimer: off-list followups get on-list replies or get ignored.
                  Please do not ignore the "Reply-To" header.

                  To unsubscribe from the postfix-users list, visit
                  http://www.postfix.org/lists.html or click the link below:
                  <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                  If my response solves your problem, the best way to thank me is to not
                  send an "it worked, thanks" follow-up. If you must respond, please put
                  "It worked, thanks" in the "Subject" so I can delete these quickly.
                • mouss
                  ... so you have two versions of postfix on your system. either remove one or make sure which one you run. ... my b[a|ug]d. of course, it should be
                  Message 8 of 16 , Apr 29 3:05 PM
                  • 0 Attachment
                    Evan Platt wrote:
                    > At 03:57 PM 4/28/2006, mouss wrote:
                    >> That may be your problem. run
                    >> postconf config_directory
                    >>
                    >> This will give you the directory used by default (when you don't use
                    >> the -c option).
                    >
                    > This says:
                    > config_directory = /sw/etc/postfix
                    >
                    >> now try
                    >> /sw/sbin/postconf config_directory
                    >
                    > This says
                    > config_directory = /sw/etc/postfix
                    >
                    >> and
                    >> /usr/sbin/postconf config_directory
                    >
                    > Says:
                    > config_directory = /etc/postfix
                    so you have two versions of postfix on your system. either remove one or
                    make sure which one you run.
                    >
                    >> these should show you the directories used by the different versions.
                    >>
                    >> do similar things with
                    >> $PATH/postfix mail_version
                    >> to see the postfix versions
                    >
                    > /sw/etc/postfix mail_version says permission denied - /sw/etc/postfix
                    > is a directory.
                    >
                    > /usr/sbin/postfix mail_version says
                    > postfix/postfix-script: fatal: usage: postfix start (or stop, reload,
                    > abort, flush, check, set-permissions, upgrade-configuration)
                    my b[a|ug]d. of course, it should be /usr/sbin/postconf mail_version.
                    >
                    >> running ldd on the binaries will show which db libs were linked.
                    >
                    > ldd? I don't have a ldd on my system unless that's a additional piece
                    > of software.
                    >
                    >
                    ldd is "a standard unix" command that tells you which libs are linked
                    into your binary. your system may have other commands for that purpose.
                  • Victor Duchovni
                    ... With Mach (aka MacOS X), the command is otool -L . -- Viktor. P.S. Morgan Stanley is looking for a New York City based, Senior Unix system/email
                    Message 9 of 16 , Apr 29 11:16 PM
                    • 0 Attachment
                      On Sun, Apr 30, 2006 at 12:05:15AM +0200, mouss wrote:

                      > >ldd? I don't have a ldd on my system unless that's a additional piece
                      > >of software.
                      >
                      > ldd is "a standard unix" command that tells you which libs are linked
                      > into your binary. your system may have other commands for that purpose.

                      With Mach (aka MacOS X), the command is "otool -L".

                      --
                      Viktor.

                      P.S. Morgan Stanley is looking for a New York City based, Senior Unix
                      system/email administrator to architect and sustain the Unix email
                      environment. If you are interested, please drop me a note.

                      Disclaimer: off-list followups get on-list replies or get ignored.
                      Please do not ignore the "Reply-To" header.

                      To unsubscribe from the postfix-users list, visit
                      http://www.postfix.org/lists.html or click the link below:
                      <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                      If my response solves your problem, the best way to thank me is to not
                      send an "it worked, thanks" follow-up. If you must respond, please put
                      "It worked, thanks" in the "Subject" so I can delete these quickly.
                    • Evan Platt
                      My apologies if I ve posted here already, but still have an issue that s bugging me... Running postfix 2.2.4 on Mac OS/X. I ve created a rbl_access file which
                      Message 10 of 16 , Jun 1, 2006
                      • 0 Attachment
                        My apologies if I've posted here already, but still have an issue that's
                        bugging me...

                        Running postfix 2.2.4 on Mac OS/X. I've created a rbl_access file which
                        consists of

                        dcn.yahoo.com OK
                        scd.yahoo.com OK
                        mud.yahoo.com OK

                        I run postmap rbl_access , and it creates the rbl_access.db . I then add
                        to my main.cf:

                        smtpd_client_restrictions =
                        check_client_access hash:/etc/postfix/rbl_access

                        I then get in my mail.log:

                        Jun 1 10:42:15 www postfix/smtpd[25475]: fatal: open database
                        /etc/postfix/rbl_access.db: Inappropriate file type or format
                        Jun 1 10:42:16 www postfix/master[56]: warning: process
                        /usr/libexec/postfix/smtpd pid 25475 exit status 1
                        Jun 1 10:42:16 www postfix/master[56]: warning:
                        /usr/libexec/postfix/smtpd: bad command startup -- throttling

                        I've tried check_client_access btree, same thing.

                        I've put both my rbl_access and rbl_access.db at
                        http://www.espphotography.com/rbl_access and
                        http://www.espphotography.com/rbl_access.db .

                        Any help greatly appreciated. I'm going nuts here. I'd love to add
                        bl.spamcop.net, but I need to whitelist yahoo groups.

                        Thanks.

                        Evan
                      • Sandy Drobic
                        ... What does postconf -m say about the supported map types? ... Hm, I just noticed that several people have already deducted you have more than one version
                        Message 11 of 16 , Jun 1, 2006
                        • 0 Attachment
                          Evan Platt wrote:
                          > My apologies if I've posted here already, but still have an issue that's
                          > bugging me...
                          >
                          > Running postfix 2.2.4 on Mac OS/X. I've created a rbl_access file which
                          > consists of
                          >
                          > dcn.yahoo.com OK
                          > scd.yahoo.com OK
                          > mud.yahoo.com OK
                          >
                          > I run postmap rbl_access , and it creates the rbl_access.db . I then add
                          > to my main.cf:
                          >
                          > smtpd_client_restrictions =
                          > check_client_access hash:/etc/postfix/rbl_access
                          >
                          > I then get in my mail.log:
                          >
                          > Jun 1 10:42:15 www postfix/smtpd[25475]: fatal: open database
                          > /etc/postfix/rbl_access.db: Inappropriate file type or format

                          What does "postconf -m" say about the supported map types?

                          > Jun 1 10:42:16 www postfix/master[56]: warning: process
                          > /usr/libexec/postfix/smtpd pid 25475 exit status 1
                          > Jun 1 10:42:16 www postfix/master[56]: warning:
                          > /usr/libexec/postfix/smtpd: bad command startup -- throttling
                          >
                          > I've tried check_client_access btree, same thing.
                          >
                          > I've put both my rbl_access and rbl_access.db at
                          > http://www.espphotography.com/rbl_access and
                          > http://www.espphotography.com/rbl_access.db .
                          >
                          > Any help greatly appreciated. I'm going nuts here. I'd love to add
                          > bl.spamcop.net, but I need to whitelist yahoo groups.

                          Hm, I just noticed that several people have already deducted you have more
                          than one version of postfix on your system. What steps did you take to
                          resolve that situation? Just what is your situation at the moment at all?!?

                          Sandy
                        • Victor Duchovni
                          ... This uses the default_database_type. ... Perhaps the default has been set to btree ? -- Viktor. P.S. Morgan Stanley is looking for a New York City based,
                          Message 12 of 16 , Jun 1, 2006
                          • 0 Attachment
                            On Thu, Jun 01, 2006 at 10:47:40AM -0700, Evan Platt wrote:

                            > My apologies if I've posted here already, but still have an issue that's
                            > bugging me...
                            >
                            > Running postfix 2.2.4 on Mac OS/X. I've created a rbl_access file which
                            > consists of
                            >
                            > dcn.yahoo.com OK
                            > scd.yahoo.com OK
                            > mud.yahoo.com OK
                            >
                            > I run postmap rbl_access , and it creates the rbl_access.db . I then add
                            > to my main.cf:

                            This uses the default_database_type.

                            > smtpd_client_restrictions =
                            > check_client_access hash:/etc/postfix/rbl_access

                            This uses hash:

                            > I then get in my mail.log:
                            >
                            > Jun 1 10:42:15 www postfix/smtpd[25475]: fatal: open database
                            > /etc/postfix/rbl_access.db: Inappropriate file type or format

                            Perhaps the default has been set to "btree"?

                            --
                            Viktor.

                            P.S. Morgan Stanley is looking for a New York City based, Senior Unix
                            system/email administrator to architect and sustain the Unix email
                            environment. If you are interested, please drop me a note.

                            Disclaimer: off-list followups get on-list replies or get ignored.
                            Please do not ignore the "Reply-To" header.

                            To unsubscribe from the postfix-users list, visit
                            http://www.postfix.org/lists.html or click the link below:
                            <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                            If my response solves your problem, the best way to thank me is to not
                            send an "it worked, thanks" follow-up. If you must respond, please put
                            "It worked, thanks" in the "Subject" so I can delete these quickly.
                          • Evan Platt
                            ... btree cidr environ hash mysql pcre proxy regexp static unix ... Still trying to remove postfix via apt-get which is where I believe it was also installed
                            Message 13 of 16 , Jun 1, 2006
                            • 0 Attachment
                              On Thu, June 1, 2006 11:12 am, Sandy Drobic wrote:

                              > What does "postconf -m" say about the supported map types?

                              btree
                              cidr
                              environ
                              hash
                              mysql
                              pcre
                              proxy
                              regexp
                              static
                              unix

                              > Hm, I just noticed that several people have already deducted you have more
                              > than one version of postfix on your system. What steps did you take to
                              > resolve that situation? Just what is your situation at the moment at
                              > all?!?

                              Still trying to remove postfix via apt-get which is where I believe it was
                              also installed from..

                              If there's anyone who knows apt-get and willing to help me out offlist,
                              would be appreciated, or know of a good apt-get group.

                              Basically attempting to remove postfix via apt-get remove postfix, I get a
                              number of mysql related errors (short version):
                              Need to get 0B of archives. After unpacking 0B will be used.
                              Setting up mysql (4.1.10-1) ...
                              Installing all prepared tables
                              060601 13:03:40 [Warning] Setting lower_case_table_names=2 because file
                              system for /sw/var/mysql/ is case insensitive
                              Fill help tables
                              060601 13:03:40 [Warning] Setting lower_case_table_names=2 because file
                              system for /sw/var/mysql/ is case insensitive
                              <SNIP>
                              No matching service found for "mysql", skipping.
                              /sw/bin/dpkg: error processing mysql (--configure):
                              subprocess post-installation script returned error exit status 1
                              Errors were encountered while processing:
                              mysql
                              E: Sub-process /sw/bin/dpkg returned an error code (1)

                              Thanks.
                            • Evan Platt
                              ... Yeah! I think I finally got all the duplicate instances of postfix remove. Everything so far is happy now. Many thanks all! Evan
                              Message 14 of 16 , Jun 1, 2006
                              • 0 Attachment
                                On Thu, June 1, 2006 11:12 am, Sandy Drobic wrote:
                                > Hm, I just noticed that several people have already deducted you have more
                                > than one version of postfix on your system. What steps did you take to
                                > resolve that situation? Just what is your situation at the moment at
                                > all?!?

                                Yeah! I think I finally got all the duplicate instances of postfix remove.
                                Everything so far is happy now.

                                Many thanks all!

                                Evan
                              • Evan Platt
                                ... And a followup question.. So now I have oviously rbl_access.db. If I regenerate a rbl_access.db , is it automatically read, or do I need to reload postfix
                                Message 15 of 16 , Jun 1, 2006
                                • 0 Attachment
                                  On Thu, June 1, 2006 3:55 pm, Evan Platt wrote:

                                  > Yeah! I think I finally got all the duplicate instances of postfix remove.
                                  > Everything so far is happy now.
                                  >
                                  > Many thanks all!

                                  And a followup question.. So now I have oviously rbl_access.db. If I
                                  regenerate a rbl_access.db , is it automatically read, or do I need to
                                  reload postfix when I make a change to rbl_access.db?

                                  And are wildcards or just a TLD domain allowed, ie
                                  yahoo.com OK
                                  will allow host1.yahoo.com, host2.yahoo.com, etc?

                                  Thanks.

                                  Evan
                                • Noel Jones
                                  ... Postfix automatically detects changes to indexed files, such as *.db. No reload required. ... With default settings, yahoo.com will match that exact
                                  Message 16 of 16 , Jun 1, 2006
                                  • 0 Attachment
                                    At 06:09 PM 6/1/2006, Evan Platt wrote:
                                    >On Thu, June 1, 2006 3:55 pm, Evan Platt wrote:
                                    >
                                    > > Yeah! I think I finally got all the duplicate instances
                                    > of postfix remove.
                                    > > Everything so far is happy now.
                                    > >
                                    > > Many thanks all!
                                    >
                                    >And a followup question.. So now I have oviously
                                    >rbl_access.db. If I
                                    >regenerate a rbl_access.db , is it automatically read, or
                                    >do I need to
                                    >reload postfix when I make a change to rbl_access.db?

                                    Postfix automatically detects changes to indexed files,
                                    such as *.db. No reload required.

                                    >And are wildcards or just a TLD domain allowed, ie
                                    >yahoo.com OK
                                    >will allow host1.yahoo.com, host2.yahoo.com, etc?

                                    With default settings, "yahoo.com" will match that exact
                                    domain and all subdomains. Matching of subdomains can be
                                    controlled with the parent_domain_matches_subdomains setting.
                                    http://www.postfix.org/postconf.5.html#parent_domain_matches_subdomains

                                    --
                                    Noel Jones
                                  Your message has been successfully submitted and would be delivered to recipients shortly.