This is something done on your domain host or nameserver host.
For example I use Fastmail.fm - all my domains point to their NS servers and I point the WEB service to my server only.
So when email is sent the sender server looks up the dns and finds the MX record at fastmail.fm. My email clients connect to there to collect their email. This means I can stop all the email services on my server.