1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Alberto Bertogli
ae1c246bde chasquid: Make "MAIL FROM" ignore extra parameters
MAIL FROM commands usually come in the form of:

  MAIL FROM:<from@from> BODY=8BITMIME

Note that there's extra parameters after the address, which for now we want to
ignore.

The current parser doesn't ignore them, and relies on mail.ParseAddress doing
so (that is, on mail.ParseAddress("<from> BODY=8BITMIME") working).
However, in go 1.7, the parser will get more strict and start to fail these
cases.

To fix this, we change the way we parse the line to use fmt.Sprintf, which is
much nicer than splitting by hand, and is more readable as well.
2016-07-22 01:44:45 +01:00
Alberto Bertogli
21e69aa42f Implement AUTH
This patch implements the AUTH SMTP command, using per-domain user databases.

Note that we don't really use or check the validation for anything, this is
just implementing the command itself.
2016-07-22 01:44:45 +01:00
Alberto Bertogli
7e7c8073c4 Implement VRFY and EXPN commands
We implement the VRFY and EXPN commands, but as no-ops. The RFC allows this,
and most implementations seem to do it this way too.

While at it, merge the tests for simple commands like these into one.
2016-07-16 12:33:50 +01:00
Alberto Bertogli
58de5a6200 Add a skeleton queue
This patch introduces a basic, in-memory queue that only holds emails for now.

This slows down the benchmarks because we don't yet have a way to wait for
delivery (even if fake), that will come in later patches.
2015-11-06 10:27:05 +00:00
Alberto Bertogli
a809a3caa9 Basic configuration
This patch introduces a basic on disk configuration, comprised of a main
configuration file and per-domain directories.

It's still not complete, but will be extended in subsequent patches.
2015-11-01 02:19:12 +00:00
Alberto Bertogli
f055a3460e Do not allow repeated STARTTLS commands
Clients should only be able to do STARTTLS once.
2015-10-26 13:40:44 +00:00
Alberto Bertogli
a5510607e8 Add some tests
This patch adds some tests that cover the SMTP commands, including STARTTLS
and various correctness checks.

There are also two simple benchmarks, that are not optimized and are more
useful for stress testing and profiling than anything else.
2015-10-26 03:40:33 +00:00