3 Replies Latest reply on May 16, 2018 6:21 AM by LokeshSurana

    ACL Error for Mail - Multiple Schema

    LokeshSurana

           Hi All,

       

      Error - ORA-24247: network access denied by access control list (ACL)

       

      I know this is common error.

       

      My scenario is, i have multiple schema assigned to application and i required to send email from application.

      Now i given ACL rights for schema user but still am getting same error.

       

      And as SMTP is only one and same SMTP we cant have multiple ACL (Principle parameter)

       

      How we can resolve this ?

       

      Thanks

      Lokesh

        • 1. Re: ACL Error for Mail - Multiple Schema
          LokeshSurana

          Hi

           

          ACL command i used,

          ALTER SESSION SET CONTAINER = PDBAPEX;

          /

          BEGIN

          DBMS_NETWORK_ACL_ADMIN.create_acl (

              acl          => 'APEX_050100.xml',

              description  => 'for enabling email functionality',

              principal    => 'APEX_050100',

              is_grant     => TRUE,

              privilege    => 'connect',

              start_date   => null,

              end_date     => NULL);

              commit;

            DBMS_NETWORK_ACL_ADMIN.assign_acl (

              acl         => 'APEX_050100.xml',

              host        => '1.1.2.54',

              lower_port  => 25,

              upper_port  => 25);

           

           

           

           

           

           

            COMMIT;

          END;

          /

           

          I have 3 schema -

          APEXPROD

          SECURITYMATRIX

          ONLINEPAY

           

          All 3 used.

           

          Please guide.

          • 2. Re: ACL Error for Mail - Multiple Schema
            Mike Kutz

            The ACL you created should be valid IF AND ONLY IF you use APEX_MAIL to send emails from APEX 5.1 to a non-TLS/encrypted email server.

             

            If you are using UTL_MAIL, you are [probably] doing it wrong.

             

            My $0.02

             

            MK

            • 3. Re: ACL Error for Mail - Multiple Schema
              LokeshSurana

              Hi

               

              Thanks for reply.

               

              Got issue, is basic difference of 11g and 12c DB.

               

              ACL syntax changes -

              I used below code and its started working fine.

               

              BEGIN

                  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

                      host => '1.17.0.54',

                      ace => xs$ace_type(privilege_list => xs$name_list('connect'),

                                         principal_name => 'APEX_050100',

                                         principal_type => xs_acl.ptype_db));

              END;

               

              Thanks

              Lokesh