A federal judge says the Trump administration "overplayed its hand" by inserting partisan language into workers' out-of-office autoreplies.