Using rules to mark and tag items automatically