The Adafruit IR Break Beam sensor comprises two components; an emitter that generates an IR beam and a receiver that is sensitive to the IR beam. When the beam from the emitter is broken the receiver pulls its digital output low. The receiver's digital output is open collector therefore the input mode for D4 and D6 were set to INPUT_PULLUP to keep them normally high.
The DFRobot Vibration Sensor uses the same type of coil mechanism inside to detect vibration. This sensor has a normally-high digital output which goes low during a vibration. I took the MCU with the sensor out for a field test with my letterbox. An LED was wired to switch on when a vibration was detected. Whilst knocks and taps were detected, inserting letters and pamphlets into the top tray did not cause a strong enough vibration to be detected by the sensor. Power was supplied by 2xAA batteries.
Tried the Adafruit vibration switch (purchased from Core Electronics) to see if it can be used to detect the insertion of a letter/package in the letterbox. It comprises a metal pin with a soft spring coiled around it. When it is moved the coil touches onto the pin, essentially behaving as a switch.