Prev | Current Page 1510 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"


22.1.3.2 Class via ldap map lookups
Adding values to class macros with ldap-type map databases is very easy. In its simplest
form, just use a literal @LDAP as the type and nothing else:
RELAY_DOMAIN_FILE(`@LDAP??)
FR@LDAP
The first form uses the mc macro RELAY_DOMAIN_FILE to add values to the
RELAY_DOMAIN class (?§7.4.1.1 on page 269). The second line adds to the same
class, but uses the F configuration command. For bothlines, the database used for
the lookup is the ldap-type database because of the literal @LDAP in both. That literal
expression causes the following default ldap schema to be used:
-k (&(objectClass=sendmailMTAClass)(sendmailMTAClassName=R)
(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j)))
-v sendmailMTAClassValue
When using the F configuration command form, you must specify the class to be
filled. For example:
F{OurStuff}@LDAP
Whichever class you specify (the {OurStuff} here) will become the class listed with
the sendmailMTAClassName= in the default schema:
-k (&(objectClass=sendmailMTAClass)(sendmailMTAClassName={OurStuff})
(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j)))
-v sendmailMTAClassValue
Naturally you can bypass the default ldap definition altogether by placing your own
into the declaration. Consider the following two lines, which do just that:
VIRTUSER_DOMAIN_FILE(`@ldap:-k (&(objectClass=virtHosts)(host=*)) -v host??)
F{VirtHosts}@ldap:-k (&(objectClass=virtHosts)(host=*)) -v host
Note that by replacing the literal @LDAP witha type declaration of @ldap, you eliminate
the automatic generation of a default definition.


Pages:
1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522
śmieszne dowcipy dieta light życzenia ślubne portal Connie Talbot