To enable a single deployment of the EasyPost Mailroom and epclient.ini configuration file, settings can be set and read using user environment variables.
Using group policies these settings can applied to users, groups and OUs as required.
In this way, databases, accounts and department lists can be set through active directory and read by the EasyPost Mailroom.
The uev value can be hardcoded in the GPO, and applied to users simply by linking the GPO directly to an OU. In this case all users of the OU will get the uev value as set. Or by using item level targeting and security groups, the value can be applied to only members of specific security groups.
Alternatively the value can be derived from a user's Active Directory attribute e.g. department, by using item level targeting and an LDAP Query.
The following example and screenshots shows the mailroom epclient.ini configuration with multiple variables, and how to setup a GPO for the %bing_dept% variable using item level targeting and the users Active Directory department attribute.
1. Create or edit the application section of the deployment's epclient.ini file. Configuration file located in %programdata%\EasyPost\Mailroom
[application] accreg=*%bing_account%* departmentlist=;*%bing_dept%* basepath=*%bing_db%* i.e. *%variable_name%*
2. Open Group Policy Editor.
3. Edit/Create the GPO.
4. Expand User Configuration>Preferences>Windows Settings>Environment.
5. Right-click and Create New Environment Variable.
6. Enter the variable name being used to set the departmentlist value in the epclient.ini file.
7. Click onto the Common tab, tick Item-level targeting and click "Targeting...".
8. Click New item dropdown and select LDAP Query.
9. LDAP Query
Filter uses the %USERNAME% i.e. currentuser.
Binding is LDAP:
Attribute is the field name from AD user object i.e. department.
Environment variable name is the name of the variable to be output.
10. The GPO can now be applied to an OU.
11. Figure 1.7 shows the user with an ad department attribute set to "Testing".
12. Figure 1.8 shows the user running the set command after logging on. A user environment variable has been set as per the attribute value in their user object.
13. Figure 1.9 shows the department list field in the Mailroom populated with the variable.