By default, Instant Messaging uses the mail attribute to determine the email address to which it forwards instant messages when a recipient is offline. If your directory does not use the mail attribute for email addresses, you need to configure Instant Messaging to use the same attribute as your directory.
Open iim.conf.
See iim.conf File Syntax for instructions on locating and modifying iim.conf.
Change the value of the iim_ldap.user.mailattr parameter to the attribute your directory uses to contain email addresses in user entries.