09 Sep 2010
Support Center
»
Knowledgebase
»
MPP ACL's using SQL Template Queries
MPP ACL's using SQL Template Queries
Solution
MPP can use
SQL Template Queries
for custom ACL retrieval.
NOTE: Use ACL's for recipient in "wbl_engines" option of group having "recipient" members and ACL's for recipient in group having "sender" members. Usually, custom queries will be used for incoming/recipient groups.
<mppd>
<common>
...
<passwords>/usr/local/MPP/secret.txt</passwords>
...
</common>
<groups>
<group id=â€defaultâ€>
...
<wbl_engines>mpp.acl_sender, mpp.acl_recipient</wbl_engines>
...
</group>
...
</groups>
<engines>
...
        <mysql id="mpp">
            <connection>
                <host>localhost.localdomain</host>
                <port>50270</port>
                <database>mpp</database>
                <unix_socket>/usr/local/mysqlÂ5.0.27/var/mysql.sock</unix_socket>
                <defaults_file>/etc/myÂ5.0.27.cnf</defaults_file>
                <user>root</user>
    <password_id>root_password_id</password>
            </connection>
            <query id="acl_sender">
                <template>
SELECTÂ `id`Â FROMÂ `accesslists`
WHERE `mail`='${escape $sender}' AND `direction`=1
                </template>
                <result id="result">
                    <if_empty_table>
                        <result>acl_sender</result>
                    </if_empty_table>
                    <if_filled_table>
<result>none</result>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
                   </if_filled_table>
                </result>
            </query>
            <query id="acl_recipient">
                <template>
SELECTÂ `id`Â FROMÂ `accesslists`
WHERE `mail`='${escape $recipient}' AND `direction`=0
                </template>
                <result id="result">
                    <if_empty_table>
                        <result>acl_recipient</result>
                    </if_empty_table>
                    <if_filled_table>
<result>none</result>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
                   </if_filled_table>
                </result>
            </query>
        </mysql>
  ...
</engines>
</mppd>
Article Details
Article ID:
44
Created On:
03 Mar 2009 11:47 PM
This answer was helpful
This answer was not helpful
User Comments
Add a Comment
Sharing is good. So if you have a comment about this entry please feel free to share. The Comments might be reviewed by our Staff and might require approval before being posted. Questions posted will not be answered, please submit a ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Back
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Downloads
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
|
Downloads
Language:
English (U.S.)