find /path/to/folder -type f -name "<regex-for-file-name>" -mtime +<number-of-days> -exec <bash-command> {} \;
Example usage:
find /var/spool/somedir/someotherdir -type f -name "msg*" -mtime +30 -exec rm {} \;