It is common (and in my mind desirable) for ISPs to block outgoing connections to port 25. This is is a feature which helps prevent spambots on their network from being fully effective. The vast majority of the Spam I block is from infected PCs running spambots.
Your best option is to configure you server to relay via your ISPs relay server. If they are blocking port 25, they will almost certainly provide such a server.
Alternatively, you may be able to use an encrypted and authenticated connection to the submission port (587) on the host you want to send email to. SMTPS (465) is not commonly supported, but may not be blocked if your mail server supports it.
EDIT: Sendmail is likely overkill in your case. Exim4 and Postfix are alternate full implementations which could also be overkill. postfix
and exim4
tend to be installed more often than sendmail
.
One of the relay only SMTP forwarders might be easier more appropriate and easier to configure. These include esmtp
, msmtp
, and ssmtp
. They will forward all mail to other servers, so are not appropriate if you want to receive some mail on the server.
In any case you should configure your host as a satellite of your ISP's mail relay. You will also need to setup the appropriate aliasing so that your email is delivered to your desired email address. This is done in /etc/aliases
for sendmail
, postfix
, and exim4
. These programs may also use /etc/email-addresses to rewrite the sender address.