group newmail script stuff in a block