1

Haven't seen a lot of posts on here related to opends but its worth a shot I guess.

I am trying to configure my server to use the SMTP Account Status Notification Handler to email users on account specifics (e.g. account disabled, password expiring soon, etc). I followed the directions in their documentation to the letter (including obviously enabling the handler) but I get no emails sent out. I've verified that the SMTP address is correct in the General Configuration section and I can manually connect to SMTP via telnet on that machine so I know that part is working. But no email is sent (double-checked spam folders and examined the mail server logs) and I'm getting nothing in the error logs for opends, it just doesn't seem to be doing anything. I feel like I must be missing something stupid, any ideas?

thanks

snappymcsnap
  • 2,050
  • 2
  • 29
  • 53

1 Answers1

1

To receive Account status notifications with OpenDS or OpenDJ, 2 things are needed. First you need to configure the SMTP Account Status Notification Handler, and that's what you've done.
The second thing is that you have to attach the Notification Handler to a Password Policy, most likely to the Default Password Policy that applies by default to all users (but Root DNs).

$ dsconfig -h localhost -p 4444 -D "cn=directory manager" -w password -X -n \
  set-password-policy-prop --policy-name "Default Password Policy" \
  --add "account-status-notification-handler:SMTP Account Status Notification Handler"

The reason for attaching the Notification Handler to a Password Policy, is that you can have different handlers for different populations, for example employee vs customers. This is something that is too often overlooked, and I've fell in the same trap the first time I was playing with Notification Handlers.

Kind Regards,

Ludovic Poitou
Product Manager for OpenDJ, open source Directory services in Java
http://opendj.org

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30
  • Ludo, thanks so much for your reply, that was exactly what was needed to get it working. It made sense when I looked under Password Policy in dsconfig and saw that account-status-notification-handler was not set but I didn't see anything in the documentation about that so either I missed it or its not well documented. Either way, thank you, today I was going to go thru every single setting in dsconfig, you saved me a lot of wasted time! – snappymcsnap Jun 22 '11 at 13:44
  • Ludo, one more question if you happen to read this. I have customized the notification messages in the template files (/opends/config/messages/). But what if I wanted to localize these for different languages? Is there a way to do this? On my user objects I store both the 'c' (country) and 'l' (locality) attributes so constructing the correct locale for a given user would be easy if opends provides the hook to accomplish this. Thanks – snappymcsnap Jun 22 '11 at 15:44
  • Hi, the current SMTP Notification Handler does not support retrieving attributes from a user to select the Notification Message. I don't think it'll be a big effort to take the current extension code and change it to support this feature. In the end, this might result in a lot of messages if users are from many countries. – Ludovic Poitou Jun 24 '11 at 12:42