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


i.e. *%variable_name%*

2. Open Group Policy Editor.

3. Edit/Create the GPO.

4. Expand User Configuration>Preferences>Windows Settings>Environment.

Fig 1.1

5. Right-click and Create New Environment Variable.

Fig 1.2

6. Enter the variable name being used to set the departmentlist value in the epclient.ini file.

Fig 1.3

7. Click onto the Common tab, tick Item-level targeting and click "Targeting...".

Fig 1.4

8. Click New item dropdown and select LDAP Query.

Fig 1.5

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.

Fig 1.6

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".

Fig 1.7

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.

Fig 1.8

13. Figure 1.9 shows the department list field in the Mailroom populated with the variable.

Fig 1.9