renamed max_messages into max_mails