The recipe files are where the instructions for handling directory attributes are specified. One directory attribute can be converted to another directory attribute, directory attributes can be concatened, changed, etc. Recipe files used for cooking convert from some specific directory format to the canonical LDIF format; recipe files used for serving convert back from the canonical format to some specific directory format. Each directory typically has its own cooking recipe file, and its own serving recipe file.
Section 18.104.22.168 provides an overview of the format of recipe files; for a full discussion of recipe files, see Section 37.8. Section 22.214.171.124 discusses the principles of creating appropriate, site-specific recipe files.
126.96.36.199 The Recipe Language
Recipe files are essentially a programming language. Since recipe files
are intended to manipulate directory attributes and their values, which
are generally thought of most naturally as strings or lists of strings,
the recipe language is rather string oriented. Recipe file syntax
includes C-like if...then...else statements and assignment statements;
structured loop statements; plus strings and list data structures
similar to those in the Icon programming language; plus special
operators and functions (mostly based on Sieve), especially string and
list functions, and also including some special directory related
functions; and the special template...endtemplate statement, used to
provide essentially a "picture" of the directory output.
With simple recipe files, often the task to be performed is to execute a few complex directory attribute transformations initially, and then copy the input directory attributes (or expressions based on those directory attributes) to the output directory attributes. Thus a typical simple recipe file can have the form of some initial C type programming statements, performing some more complex directory attribute transformations, and then a "template" statement describing the directory output.
Details of the recipe programming language are described in the Section 37.8.
188.8.131.52 Creating Site Appropriate Recipe Files
A SYNC_DIRBOT channel that needs to operate on information from and for
a directory needs to reference appropriate recipe files for the COOK
and SERVE options for that directory. Thus a site will in general need
a COOK recipe file, and a SERVE recipe file for each directory a DIRBOT
handles. A SERVE recipe file for a directory is usually essentially the
converse of the COOK recipe file for that directory; the COOK recipe
file converts from the directory specific attributes to the canonical
attributes, whereas the SERVE recipe file converts back from the
canonical attributes to the directory specific attributes.
Each site's recipe files will need to be created and customized specifically for the site's own needs: which directories are in use, and which attributes the site uses and cares about for each directory. The "canonical" directory format is also site specific: it needs to essentially provide a superset of all the specific directory attributes. X.500, having a rich set of directory attributes, can be a good model for the attributes to use. (Though in some cases even X.500 will not have all the sorts of attributes one might want.) In general, the more that "standard" directory attributes (such as X.500 attributes) can be used for the canonical directory format, the simpler support is likely to be.
In general, recipe files for LDAP servers or X.500 directories are fairly straightforward (if rather long); as the X.500 attributes are natural LDIF attributes, the recipe files for such directories tend to consist mostly of straightforward copying of attributes. Recipe files for something like cc:Mail or GroupWise (Word Perfect Office), tend to be short---such directories have very few attributes---but will likely involve some manipulations of the directory attributes, since the attributes in such directories do not (without the work of the recipe files) tend to match up to natural LDIF attributes. Recipe files for something like Lotus Notes, which has a rather arbitrary directory structure, can involve both many sorts of manipulations of attributes and many such attributes.