Whitelisting in ejabberd roster

I am using ejabberd 16.03.I am able to block roster items on client side using smack library, now i want to allow only specific roster /buddy to send message and block all others. Specifically,I want to perform white listing (opposite of blacklisting) like Gmail in ejabberd. How would I implement this.
Any suggestions must be appreciated.

Thanks,
Vipul Pachauri

See example 8 in

See example 8 in http://xmpp.org/extensions/xep-0016.html#example-8 that defines a list called 'special', which allows communications only with three specific entities.

Thanks for suggestion but It

Thanks for suggestion but It works fine to allow specific user but do not block rest users.

Syndicate content