The default server on Ubuntu is postfix which provides SMTP services. It should be able to be configured to listen on any or all of the standard ports SMTP(25), SSMTP(465), and Submission (587). The port used for any of these services should be reconfigurable. Configuration should be in
/etc/postfix.com and or
/etc/postfix.d. Check the configuration for a port string.
man postfix.conf should give you documentation on the configuration.
aptitude install postfix-doc will install the postfix documentation package into
I use Exim4, which does allow the ports to be specified, instead of postfix. You should only have one SMTP package installed. The sendmail interface is provided by the Exim4, postfix, and sendmail packages.
Make sure you have an SMTP program running with the command
netstat -lnt | grep :25. This should return at least one line.
Unless you have a static address configure your server to use your ISP's mail relay as a Smarthost. Your ISP may (should) be blocking outgoing connections to the Internet on port 25. This is done to deal with spambots which often run on virus infected PCs.