Fixed legacy issues in mailserver module