Filter with valve and drain valve