Specialized Administration > Windchill Directory Server Administration > Configuring a Windchill Directory Server > Setting Windchill Directory Server Password Policies > Setting Up Email Notifications for Password Policy Events
  
Setting Up Email Notifications for Password Policy Events
To set up email notifications that are sent to users for password policy events, you must complete a set of tasks. The example dsconfg commands provided in the tasks assume the following:
The commands are entered on the host where Windchill Directory Server resides (localhost is used).
The Windchill Directory Server administrative port is 4444.
The Windchill Directory Server bind DN is “cn=Manager” and the bind password is “admin”.
* 
Important information about notices of upcoming password expiration:
The Windchill Directory Server only checks for upcoming password expiration when a user binds to the directory. A bind on behalf of the user occurs automatically when the user logs into Windchill. If the user does not login to Windchill, or otherwise bind to the Windchill Directory Server, no notice of upcoming password expiration will be sent. Set expire-password-without-warning to false to allow the user to login if a warning has not been sent.
Only one warning notice will be sent warning of an upcoming password expiration.
The tasks to complete are as follows:
Configure the SMTP Account Status notification handler.
To configure the notification handler, you must configure Windchill Directory Server to use the SMTP mail handler and enable an SMTP handler for notifications. For example, use commands similar to the following:
dsconfig -D "cn=manager" -w admin -n
set-global-configuration-prop
--set smtp-server:<host name> --trustAll

dsconfig set-account-status-notification-handler-prop
--handler-name "SMTP Handler"
--set "enabled:true" --hostname "localhost" --port "4444"
--trustAll --bindDN "cn=manager" --bindPassword admin --no-prompt
Replace <host name> with the name of the host where your mail server resides.
Configure the password policy you are setting up to add the SMTP account status notification handler. For example, use a command similar to the following to set the handler for the default password policy:
dsconfig set-password-policy-prop
--policy-name "Default Password Policy"
--add "account-status-notification-handler:SMTP Handler"
--hostname "localhost" --port "4444" --trustAll
--bindDN "cn=manager" --bindPassword admin --no-prompt
Configure the sender-address in the SMTP Account Status Notification Handler property. For example, use a command similar to the following:
dsconfig set-account-status-notification-handler-prop
--handler-name "SMTP Handler"
--set "sender-address:<user_address>"
--hostname "localhost" --port "4444" --trustAll
--bindDN "cn=manager" --bindPassword admin --no-prompt
Replace <user_address> with the address of the recipient that appears in the From address of the email.
After you complete the tasks, users automatically receive email notifications when password policy events occur.
The following are examples of password notifications:
Your directory password will expire in 3 minutes, 0 seconds.
Please change your password before Thu Aug 06 12:56:20 CDT 2009 so that it does not expire.
For further assistance, please contact a directory administrator.
Your directory password has expired.
Please contact a server administrator to have your password reset.
Your directory account has been locked because it has remained idle for too long.
For further assistance, please contact a server administrator.
The content of these messages can be customized. Message templates are stored in the <WindchillDS>/server/config/messages directory, where <WindchillDS> is the Windchill Directory Server installation directory. Change the appropriate template file to change the contents of the notifications sent to the user.