forwardemail / free-email-forwarding

The best free email forwarding for custom domains. Visit our website to get started (SMTP server)
https://forwardemail.net
Other
2.44k stars 182 forks source link

[docs] self-hosting + Docker guide #111

Open rdlmda opened 5 years ago

rdlmda commented 5 years ago

Is it possible to run this in one (or more) Docker containers? I'd really like to know.

I suppose I could try to write a docker-compose file but my knowledge of Docker, networking, email standards, etc are not up to the task. So I'd feel more comfortable if someone more knowledgeable could pick up this task.

loiu92 commented 5 years ago

For my own usage, to try forward-email, i'm writing Dockerfile and docker-compose to have all requirements in container. I can share it when it's done

rdlmda commented 5 years ago

@loiu92 that would be amazing! Please do.

nysky1 commented 5 years ago

How's this file coming?

UnoSD commented 5 years ago

This would be awesome for self-hosting in the cloud. Is there any update? I will try and do it myself, but I have a really poor Docker experience.

UnoSD commented 5 years ago

It took me a while as Docker debugging is not exactly straightforward... but:

https://github.com/UnoSD/forward-email-docker/blob/master/Dockerfile

Some commands are a massive hack (like getting the README.md file and extracting the start script), but at least it should be working and it should be easy to fix and update.

EDIT: Well, ehm.. working... it runs and starts the service, I don't know if it actually works, but I will test it possibly tomorrow.

EDIT: I give up, I can get it to communicate over auto assigned ports, but not 25. It it frustrating and I cannot waste so much time on this, if anyone with a good Docker knowledge fancy helping, I can resume.

UnoSD commented 5 years ago

This is annoying. I figured out why... Azure blocks port 25 so that cannot be hosted on Azure. @niftylettuce can your app work with a encryption? 25 seems to be blocked to avoid unencrypted traffic that is, by convention, on that port. I can obviously use a different port, but then I presume the traffic will have a different format being encrypted so it won't work.

niftylettuce commented 5 years ago

@UnoSD port 25 is required, so Azure is out.

niftylettuce commented 5 years ago

@UnoSD can you submit a PR to this repo with your beautiful docker file? 👍 🙏

niftylettuce commented 5 years ago

Actually, if you submit a PR, I will update and fix it all for you. There are a lot of issues with your current file right now. I just took a quick glance

UnoSD commented 5 years ago

@niftylettuce without Azure support is pretty useless for me, so I can't spend much more time trying to make it work, but I am happy to fork your repo and put it somewhere for you to update it for others, any preference on the folder?

Update: Contacted Microsoft and they opened it for me, back in the game :)

I've create the PR, I have created a git submodule to carry on creating the infrastructure stuff independently, if you prefer just a file PR, let me know.

tracker1 commented 5 years ago

UnoSD since it's really small, you could probably use a smaller provider like DigitalOcean or Linode to host the app... Thinking to myself, may put this on my dokku server on DO.

X1Aaron commented 5 years ago

@UnoSD @niftylettuce Thanks! :)

UnoSD commented 5 years ago

@tracker1 thanks for the suggestion, I will look at those providers, too, but I get free Azure credits with my MSDN subscription, so I don't have to pay for the container there.

davidkaufman commented 5 years ago

FYI: Amazon AWS also blocks SMTP connections to new EC2 instances by default. Well, they say they just "throttle" inbound traffic on port 25, but in my experience traffic is slowed to zero bytes per second :-) But, like Azure, they will unblock the port if you just ask. You can ask by submitting this form: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/