This circuit uses a magnetic proximity switch to activate an LED. It was designed to light up the inside of a mailbox when the door is opened. I found a small magnetic 433MHz door/window alarm circuit from Electronics Goldmine to supply the magnetic switch, 9V battery housing, and plastic enclosure. The unnecessary parts were cut off the alarm circuit board to make room for a magnetic proximity light pcb. Wires were soldered to the switch and battery contacts to connect the existing and new circuit boards. A small hole was drilled for the LED to stick out and the new circuit board was mounted inside.
The switch is connected to the blue wires, 9V power to the orange wires, and the LED to the green wires in the image above. The behavior of this circuit is quite simple, the LED turns on when there is no magnet near the proximity switch (i.e. when the mailbox door is opened).
Mounting the enclosure inside the mailbox is a little tricky, I was able to use caulking as an adhesive but you could also drill holes for bolts.
Magnets don't work well to fasten the enclosure because the mail carrier can (will) push it out of alignment causing the light to run continuously (as if the door was open) and drain the battery quickly. I measured the current at 5.3mA with the light on and 0.08mA with the light off so a 9V battery should last a few months.