How to store/handle messages for unregistered user

Guys,

How can I force ejabberd to save messages sent to unregistered users. Currently ejabberd returns error 503 service-unavailable.

It would be great if I could store these messages in offline storage and then clear them when user logs in for the first time. Else is there any event that can be used to handle the messages for unregistered users?

Syndicate content