You need a Mail Transfer Agent (MTA), more commonly called a mailserver, to handle your mail. I suggest installing Postfix as it is reasonably straightforward and secure. You would want to put the following settings in /etc/postfix/main.cf:
Code:
myhostname = hostname.example.com
myorigin = $mydomain
inet_interfaces = loopback-only
mydestination =
The first line sets your hostname (customize for your actual case). The second sets addresses for mail coming from your webserver to be
something@example.com. The third line tells Postfix not to listen for external network connections (i.e., it cannot receive mail from outside). The fourth specifies that there are no local addresses - that is, no mail has this machine as its final destination.
This should pretty much be it. If you run into trouble with Fastmail not accepting messages, you may want to look into the
guide for using external SMTP servers.