Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Offtopic: a free open source Email server (SMTP, POP3, IMAP) written in Go would be awesome.

I always hate how complicated and time consuming the configuration is of the good old postfix and the various other packages.



I did write an SMTP and POP3 server to learn Go a while ago - I was still learning the language, so the code is messy and terribly designed, but it works for receiving and reading emails. Together with a sendmail wrapper, I have been using it instead of postfix/dovecot due to my naiveness to write postfix config files:

http://github.com/trapped/gomaild


Couldn't agree more and have considered building something similar in the past. Seems like such a gigantic project though.

I'd probably host my own mail if it were a matter of installing one server, hooking it up to a database (much prefer the idea of storing email in a database than mbox files) and giving it a few details. Even better if it came with a simple web interface for viewing email and for configuring.

I've set up mail servers in the past but I've always been left a bit uneasy, as if there's a possibility I've not quite set it up right.


I started on:

   https://fossil.alienscience.org.uk/repos/alien-mail/home
It is paused because IMAP seems to be the hardest part and I started a project with others to implement an IMAP server in Go:

    https://github.com/alienscience/imapsrv
Progress on both projects is very slow - I spend about 3 hours a week on it. However, help is always welcome.

Edit: The two hard things about writing email servers are that its incredibly boring and there is a lot to write.


Not written in Go but look into OpenSMTPD[1].

[1]: https://www.opensmtpd.org


Seems to be only SMTP...

The issue with most Unixy mail kits, is it's a collection of software that isn't always well coupled, and bundled together in really haphazard ways...

Many people want a simple interface that gives them administrative control (separate from physical accounts on the machine) that upgrades as a complete set...

With Unixy mail systems, you update dovecot, crap, something else breaks.. you have an older mysql backing it, crap, everything breaks when you upgrade... there's too many disconnected pieces for someone that isn't a full time mail admin to effectively keep up with.

I believe the original request is for something similar to say SmarterMail but open-source and free... something easy to setup, cross platform and packaged in a modern approachable language.... If I didn't have to work, I've often thought about doing something similar with Node.js


This might be a good starting point:

https://github.com/flashmob/go-guerrilla


Go would help for security, but would it help for configuration? Unless you configure it purely by writing extensions in Go.


> would it help for configuration

Yes, definitely. Try to set up the whole email pipeline in Linux/*BSD. You need dozens of programs including sendmail/postfix and each has its own config format. Many of these programs had their first release in the late 1970s or 1980s and probably no one understand every flag anymore. It's very time consuming (at least 4 hours) to config all packages.

How would a new implementation in Go help? It would be a clean break. Less features but a stable high performance implementation would be a win. Go is the ideal language for that task.


I love Go too, but I have to disagree with you about Postfix -- it was first released back in 1998, it has a very sane config file format, and it definitely does not take 4 hours to configure. Actually it only took me a couple of minutes last time I did it for a client.


Please don't mix up things. I wrote "You need dozens of programs including sendmail/postfix and each has its own config format." If you only send emails, you only need one application sendmail or a clone like postfix. (postfix was indeed created to fix some of the annoyance of sendmail) It's easy enough to set up. But if you need an inbox so that you can receive emails too, you need the whole bunch of applications that will require you to install craylists, antivirus (claimav), etc. - I doubt that this process takes you just a couple of minutes. Or do you work for an email hosting provider with a bunch of proprietary scripts?


Well, this was sort of what I was getting at: things like antispam and antivirus are plugins that are inherently high-configuration.

You could Apple-ise the process by making a single suite of software that installs as a unit and gives you a system that can receive inbound mail, store in a DB (ie, ditch mbox and maildir), make it available over IMAP, POP and some JSON API. Then all you'd have to do is give it a list of domains and users for those mail domains. That's the 80% solution. But I guarantee people will start campaigning for features which require configuration complexity.


Ah, I assumed you meant only the SMTP pipeline - my bad. But what you said was like saying setting up a Web site is hard because you need to deal with haproxy, nginx, hooking up recaptcha, implementing OAuth2 and so on. I don't think rewriting everything in Go is going to help.

I did work at an email service provider years ago though, so I concede I might be more familiar about email than most people.


> I don't think rewriting everything in Go is going to help.

I meant a single Go executable that provides most functionality of a common email server (SMTP, POP3, IMAP, inbox, web admin interface, webmail). (anti-virus, anti-spam, ... would still be external third party processes)

A Go executable would be easy to update and can be compiled for many platforms. Updating a unix style mail server with like a dozens of programs that call each other in a pipeline style way is non trivial - except you do it as your main work. The same goes for the configuration of each component so that everything works together.


Im not sure why you assume it's a given that anybody writing an email server in go will include clamav functionality out of the box.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: