OpenDJ: Mail Users About Account Status

OpenDJ community logo You can mail users about their account status. I found this while documenting the monitoring interfaces of OpenDJ today.

For extra credit, you can guess how to set up password policy by preferred language, and then configuring a handler per preferred language so the mails for non-English speakers do not have to get sent through

  1. Identify the SMTP server to which OpenDJ sends messages.
    $ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \
    > set-global-configuration-prop --set -X -n
  2. Set up OpenDJ to be able to mail users about account status.
    $ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \
    > set-account-status-notification-handler-prop \
    > --handler-name "SMTP Handler" --set enabled:true \
    > --set email-address-attribute-type:mail -X -n

    You can also configure the message-subject and message-template-file properties. Try interactive mode if you plan to do so.

    You find templates for messages by default under the config/messages directory. You can edit the templates to suit your purposes.

  3. Adjust applicable password policies to use the account status notification handler you configured.
    $ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \
    > set-password-policy-prop --policy-name "Default Password Policy" \
    > --set account-status-notification-handler:"SMTP Handler" -X -n

I suppose this belongs in the Admin Guide chapter on password policy.

2 thoughts on “OpenDJ: Mail Users About Account Status

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.