Added an optional parameter to /ajax/mail?action=all

filter - The category id to filter for. If set to general retrieves all mails which does not belong to any other category.