Configure proper mailname and hostname for managed hosts