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 smtp.translate.google.com.

  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 smtp-server:smtp.example.com -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.

Advertisements

2 Comments

Filed under Directory Services and LDAP

2 responses to “OpenDJ: Mail Users About Account Status

  1. Shahryar Sedghi

    Is there a way to have a userid and password for smtp server?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s