mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.71k stars 113 forks source link

Ability to use mox over bidirectional stream: 2024: mox world’s only functional Go IMAP4rev2 server #119

Open haraldrudell opened 10 months ago

haraldrudell commented 10 months ago

With few changes mox imapserver package can be used over a bidirectional socket io.ReadWriteCloser

mjl- commented 9 months ago

Sorry for the late reply, was busy on other work, then at FOSDEM.

Indeed, an IMAP server could be spun up relatively easily on a socket. That's also how the internal tests work. I'm wondering: What kind of use cases do you have in mind? Testing Go client code against the mox server? At least that seems like an understandable and reasonable use-case.

I suppose it could be almost enough to export the serve and limitersInit functions. mlog.LogModel could be added separately too. Then the imaptemp package could be implemented externally, it feels niche enough for that.