I have a couple of domains for all kinds of different projects, some on shared hosting (with a mailbox solution from the provider) and some on a private VPS.
My goal is to move everything to my VPS but the problem I currently have is that I don't know how to setup a mail server solution. Any advice would help me a lot, do you have your own mail server solution or are you using a 3rd party service?
Maybe some requirements that I currently have:
- Supports multiple domains
- SMTP so I can send mails from my backend application
- Can create multiple mailboxes if needed
I understand that there is not 1 perfect solution but any tips are welcome to help me reach my goal.
Top comments (22)
I have needed to do the exact same before. I found a great open source tool called Mail in a box. It requires a little bit of setup but it is documented fairly well and I believe they even have a video tutorial. Might be worth checking it out -github.com/mail-in-a-box/mailinabox
Thanks for the mailinabox tip. Launched my on AWS and after a little fighting with security groups and DNS, it is receiving email.
I wanted email on my own domain without using a hosting provider and this solves that. Thanks!
Very interesting, I will definitely check this out!
Did you install this on the same server as your other applications or a dedicated VPS for mail only?
On a dedicated VPS. Depending on your needs, a small $5 or $10 digitalocean droplet will suffice
Thanks again! I will try this and if I get it working and has everything that I was expecting I am going with this option.
You'll love it. I promise.
There are different ways to do this, but Rails is about to ship features around this use case (I think).
Introducing Action Mailbox for Rails 6
A lot of Rails is designed to abstract away typically over-complicated domains, so this will probably be a decent solution.
Very interesting, will be looking out for the official release and any projects that might flow from this.
As you know I don't have much experience in Ruby, but I still try my best ๐so I don't know if this is a solution for me to have a solid mail solution but still interesting to maybe play around with in the future.
Not a real suggestion, but pay attention to SMTP configuration: it's too easy to miss some obscure conf and be labeled as a possible spammer, so your email won't be delivered. I really think that using an external SMTP is WAAAAAY better.
I will use those online mail scanner tools that will give a spam score and suggestions to improve my mail settings. I understand what you are saying and that setting up a mail server costs time.
Well if you are DIYing the whole solution on your VPS. You might be able to hack together something using mailgun API which can do the heavy lifting for you.
It supports both SMTP for sending of emails, and an API for receiving of emails.
Quite easy to hack together your own inbox - we did so for a temporary inbox project inboxkitten.com
See : dev.to/uilicious/the-stack-making-...
And could be easily extended out for long term storage.
Alternatively, the full real hard-core way would be to do the self-hosting of mail servers yourself. However this is an uphill battle not in getting it to work, but ensuring that your mail servers are configured will to not get marked as spam, etc. I tried... T_T
Thanks Eugene for sharing your project, indeed an option would be to build something myself but that is not what I am currently looking for. But still I will keep it in mind and maybe in the future this will help me.
I think I am going with this option: github.com/mail-in-a-box/mailinabox
But still open for feedback, don't have time this weekend so am probably not going to work on it just yet.
Took a look at mailinabox, it looks potentially a good fit for a plug and play (im assuming you already have existing systems needing SMTP/IMAP). =)
Hello! Although it is not relevant, if you only need to receive email, I know that you can use github.com/uilicious/inboxkitten to do it! You can deploy your own version of Inboxkitten in Firebase (the steps are in the github) and use your own domains for your usage.
Thank you for sharing this project, very interesting. But I think that this isn't exactly what I was looking for. I am looking for a full mail server solution (sending and receiving).
I don't know if this is too oldschool, but why don't you setup a postfix/dovecot server? That'd give you virtual mailboxes for as many domains as you like and SMTP and IMAP access. You could even add centralized spam filtering if you'd like.
I actually tried this (I think a year ago) but couldn't find good documentation at the time so got lost in the complexity and gave up.
I was also trying this on my VPS where I have other applications running and wanted to avoid breaking anything else.
if you want to do everything on your own (which can be a huge pita) -> this can be a good start: github.com/Kickball/awesome-selfho...
Thanks for this list! Any recommendations?
I am using zoho
SES is a managed service for sending and receiving mail. Sending is trivial, and here are the docs for receiving
docs.aws.amazon.com/ses/latest/Dev...
Thanks for the suggestion, for someone like us this might be useful but on first sight it doesn't seem useful if I would ever setup a mailbox for someone else. But I will still keep it in mind!