remove leading and trailing spaces in references and replyto