search and filtering for inbox and outbox