Door close magnets usually have two components. A metal "keeper" often a circular disc fixed to the door and a magnet often in a plastic holder fixed to the carcass of the piece of furniture. You need both of them in place for it to work effectively.
The plastic magnet holder often has elongated slots where the fixing screws pass through. Your magnet(s) may have slipped away from the keeper - they need to be in direct physical contact (touching) to hold the door closed.
Try and move the plastic holder towards the door.
Peccavi
February 2009