While Postfix is the default MTA for Ubuntu, I think sendmail is a better solution for a simple mail relay.
First, install a copy of Ubuntu server on some clunker machine in your office. It doesn't need much horsepower at all; even a 486 with 256 MB of RAM would suffice. Now we're going to replace Postfix with sendmail:
Next go to the /etc/mail directory and edit (as root with sudo) the file sendmail.cf. You need to change three lines in that file. First, find the line that begins with "DS" and add the name of the relay host immediately thereafter:
sudo apt-get purge postfix
sudo apt-get install sendmail
Note that there's no space between "DS" and the hostname.
# "Smart" relay host (may be null)
Next, you'll need to remove the limitation that sendmail listens only to the localhost interface. Find the two lines that read:
and delete the ", Addr=127.0.0.1" from the end of each line. Sendmail will then listen on all interfaces.
O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1
O DaemonPortOptions=Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1
Now restart sendmail with "sudo service sendmail restart".
The only remaining issue is how to route mail to this box for relaying. I take it you don't want all the mail to go through here, just the messages you described. (I'm not really clear how this relates to the printer, but we'll leave that up to you.) Give the box a hostname like "relay.yourdomain.com" and add an A record entry to your internal DNS for it.
Let's do a bit of testing before moving on. Run "telnet relay.yourdomain.com 25" and you should be the sendmail banner in reply. Let's suppose that you're sendmail a message From firstname.lastname@example.org to email@example.com. Follow these steps to test your configuration. The entries you type are in bold:
We're almost done, but I need to know a bit more about how mail is configured within your office. Do you have an existing mail server? Can it be configured to route mail by domains? If so, tell it to send mail for the offsite provider that requires SSL to the relay box and handle all other mail the way it does now. If you can't get this configured properly, ask me again, and we'll set up the relay box to handle routing.
$ telnet relay.yourdomain.com 25
220 relay.yourdomain.com ESMTP Sendmail 8.14.4/8.14.4/Debian-2ubuntu2; Wed, 2 May 2012 1ing access from: localhost(OK)-localhost [127.0.0.1]
250-relay.yourdomain.com Hello hostname.of.sending.machine [ip.of.sending.machine], pleased to meet you
250-AUTH DIGEST-MD5 CRAM-MD5
250 2.1.0 firstname.lastname@example.org... Sender ok
250 2.1.5 email@example.com... Recipient ok
354 Enter mail, end with "." on a line by itself
testing testing testing
250 2.0.0 q42JroEC005697 Message accepted for delivery
221 2.0.0 relay.yourdomain.com closing connection