I recently wrote a simple module for silent receiving of SMS messages. Standard inbox module happened to be unreliable to me because of its race conditions and errors like KErrDenied when I tried to use Inbox.delete(id) immediately.
I found useful example code SilentSMS on using sockets on Nokia Forum and made a PyS60 wrapper for it. You can download it and browse the source on smswatch homepage. I also provided some example code on getting started site.