spilled-ink / spilld Goto Github PK
View Code? Open in Web Editor NEWEmail server
Email server
The outlook.com webmail client issues a IMAP LIST "" "%"
. Let's support that.
Many clients want to send email on port 587 instead of 465. For compatibility, let's support it.
The difference with 465 is that the initial connection is not made with TLS, then the client issues STARTTLS. (We will require STARTTLS.)
This requires a small change to the configuration. Probably easiest is if we add another msaAddr parameter. That's a lot of parameters. It may be time for a config struct.
Hi,
I tried to use spilld, but I got this error on ubuntu 16.04, and I don't understand why it does that.
I tried to investigate to understand, and it seems the type switch in *net.ListenConfig.Listen()
can't distinguish which type of addr it is.
spilld -dev -debug_addr :22222
spilld, version unknown, starting at 2019-06-30 13:18:52.717845551 +0000 UTC m=+0.005995874
***DEVELOPMENT MODE***
temp dir /tmp/spilld-425601882
listen tcp :53: address :53: unexpected address type
I added some debug fmt.Println
in the src/net/dial.go
to see what was wrong:
diff /tmp/dial-dbg.go /usr/local/go-1.12.6/src/net/dial.go
11,12d10
< "log"
< "reflect"
619,620d616
< log.Println("addr:", reflect.TypeOf(la),
< reflect.ValueOf(la))
And the output is now:
spilld -debug_addr :22222 -dev -dns_addr :8888 -imap_addr :9943 -smtp_addr :2525 -msa_addr :1465
spilld, version unknown, starting at 2019-06-30 22:38:14.890883754 +0200 CEST m=+0.003851093
***DEVELOPMENT MODE***
temp dir /tmp/spilld-843824628
addr: *net.TCPAddr :9943
addr: *net.TCPAddr :2525
addr: *net.TCPAddr :1465
addr: *net.TCPAddr :8888
listen tcp :8888: address :8888: unexpected address type
I don't get why it fails for this special case.
Instead of manually trying to buffer an entire email message into RAM and then process it consider using https://github.com/emersion/go-smtp who has built (from what I can see) the world's best OS Go email parsing libraries (MIME, DKIM, SMTP, etc...) already including full streaming support for MIME envelope creation and parsing and textproto for decoding/encoding.
I personally tried to beat his package forking Mark Hale's https://github.com/Xeoncross/smtpd (which he forked from Brad Fitzpatrick's go-smtpd) to support streaming support via a custom https://github.com/Xeoncross/mimestream implementation and still failed to reach proper performance.
Please, consider abandoning your current SMTP library for this streaming performance-orientated SMTP server/client. Lets try to reduce the duplicated work needed for important projects like personal email servers. I'll try to add your library to my benchmarks when I get a chance to show the gains you could have.
Also, note that you might be able to borrow ideas from https://github.com/emersion/maddy and https://github.com/foxcpp/go-imap-sql
spilld/imap/imapserver/imapserver.go
Line 779 in 299d67c
spilld/imap/imapserver/imapserver.go
Line 780 in 299d67c
Probably a copy paste issue.
Would suggest appropriate LICENSE and .gitignore files in the root of the project...
The LICENSE file would hold to the specific license version you are using... right now, there's not really clarity in this.
Also, may want to consider AGPL[1] license if you don't want your code used for creating a competing mail service around the software without contributing changes. This would likely be more appropriate for your use case.
As to the .gitignore, mainly to prevent accidental checkins.
ASIDE: Glad to see this work... I've had a strong interest in email servers/services for some time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.