How to purge old email from mail queue

I have in the mail queue some messages that are 13 days old!

I used to use this command to kill spam:

grep -l yahoo@yahoo.com /var/spool/exim/input/* | xargs rm -rf
and also I created this script:

#!/bin/sh

cd /var/spool/exim/input/

for file in *
do
grep -l USER@DOMAIN.COM $file | xargs rm -f

done

exit
what I need now is some command or script who will purge all email frm teh mail queue that is, say, 3 days old or so. Better even, where can I set it that it will automatically purge emails when they reach 3 days in the queue?

Thanks much

 

 

 

 

Top