This instructable will show you how to make a web-connected mailbox sensor home mailbox sensor. Besides emailing you when your mailbox is opened, it will also signal a Raspberry Pi sitting in your house to play an audio announcement. There is also a web-accessible Android/iPhone interface for you to check what time mail was delivered, as well as display the battery voltage left on the sensor.
But this could also easily be used as a web-connected security system, one that both plays an audio alarm in your home and emails you when the someone breaks into your house.
Under normal use (a few door openings per day), the battery powered mailbox Arduino should last over a year on a set of 4xAA batteries. The transceiver has a range of over 700 feet through multiple walls, so this should work for most situations.