How to automate inbox management