messages: moved legacy files and mail utils