if all you are doing is checking mail and posting it to slack why mess with all that crap
all you need to do is a set up some flavor of *nix that has a mail server. There are tons of images out there you can get that have a min install of some version of linux and a mail server.
write a script that checks for mail and posts the body to slack. pretty much any language you choose will have libraries to check and parse email.
to post to slack you just have to go into integrations -> build your own
they will give you a url to post to
and then post a json file to that url.
from the command line on *nix it would look something like this
curl -X POST --data-urlencode 'payload={"channel": "#email", "username": "emailbot", "text": "This is posted to #email and comes from a bot named emailbot.", "icon_emoji": ":ghost:"}'
https://hooks.slack.com/services/somebigasscode
not sure why you need to have your own mail server. a script on the server could just as easily check gmail/hotmail/yahoo via pop3 or imap.