How to connect to ports 25 and 587

Yes.
So, the question is how you got there… How did you install Virtualmin, and most importantly, what was installed on the server before?