Commit graph

16 commits

Author SHA1 Message Date
fox.cpp
a45c7090c4
Improve auth. provider interface
The authentication provider can now provide multiple authorization
identities associated with credentials. Protocols that support that
(e.g. JMAP, SASL) can let the client select the wanted identity.
2020-02-27 01:22:47 +03:00
fox.cpp
353c1edd5e
Move Received header field generation into pipeline code 2020-02-22 23:02:00 +03:00
fox.cpp
d28b4a5dfa
endpoint/smtp: Protect command handlers with a mutex
Makes sure delivery is in consistent state when it is closed due to
shutdown.
2020-02-22 04:32:46 +03:00
fox.cpp
5bf8cb9f03
endpoint/smtp: Limit amount of Received header fields
Closes #79.
2020-02-16 01:31:47 +03:00
fox.cpp
3b8c02b998
endpoint/smtp: Add option to use FS as a temporary body store
Closes #76.
2020-02-15 23:49:01 +03:00
fox.cpp
4a875e69dc
endpoint/smtp: Move limit enforcement before "incoming message" log record
Avoid the possibility of logs flooding before limits can be applied.
2020-02-15 17:02:48 +03:00
fox.cpp
c3ebbb05a0
Generalize message flow restrictions
Set of flow restrictions is represented as a "limits" module instance
that can be either created inline via "limits" directive in some modules
(including "remote" target and "smtp" endpoint) or defined globally and
referenced in configuration of modules mentioned above.

This permits a variety of use cases, including shared and separate
counters for various endpoints and also "modules group" style sharing
described in #195.
2020-02-15 17:02:48 +03:00
fox.cpp
56ffdff07f
storage/sql: Enable I18NLEVEL=1 IMAP extension
go-imap-sql is already Unicode-aware so no other changes are needed.
I18NLEVEL=2 is not generally worth the effort so it is ignored.
2020-02-08 03:23:00 +03:00
fox.cpp
122168bef1
future: Allow to pass an error value alongside result 2019-12-13 17:31:35 +03:00
fox.cpp
c4ea9a730f
Instrument the SMTP code using runtime/trace
runtime/trace together with 'go tool trace' provides extremely powerful
tooling for performance (latency) analysis. Since maddy prides itself on
being "optimized for concurrency", it is a good idea to actually live up
to this promise.

Closes #144. No need to reinvent the wheel. The original issue
proposed a solution to use in production to detect "performance
anomalies", it is possible to use runtime/trace in production too, but
the corresponding flag to enable profiler endpoint is hidden behind the
'debugflags' build tag at the moment.

For SMTP code, the basic latency information can be obtained from
regular logs since they include timestamps with millisecond granularity.
After the issue is apparent, it is possible to deploy the server
executable compiled with tracing support and obtain more information

... Also add missing context.Context arguments to smtpconn.C.
2019-12-13 17:31:35 +03:00
fox.cpp
305fdddf24
Use context.Context all over the place
It is useful to define background tasks lifetimes more precisely,
especially involving timeouts and other cancellation methods.

On top of that, several tracing facilities are context-based (e.g.
runtime/trace), so it is possible to use them now.
2019-12-13 17:31:35 +03:00
fox.cpp
48e21f566e
Extend .debug.* flags and hide them by default
Allow to override DNS resolver address via the -debug.dnsoverride flag
and SMTP port via -debug.smtpport.

All flags are not available unless maddy is built using the 'debugflags'
tag.
2019-12-13 17:31:35 +03:00
fox.cpp
a574b9fbb2
Use Unix socket to pass IMAP updates from maddyctl to daemon
There is abstraction 'updates pipe' defined for future use with
configuration involving IMAP data replication (e.g. multiple nodes with
maddy instances + PostgreSQL replicas + S3 bucket for messages).

However, for the case of local SQLite3 DB, limited UDS-based
implementation is provided. It solves the problem of maddyctl not being
able to tell the server about modifications it makes. Alternative to
this approach would be to have server actually perform operations and
maddyctl being a dumb API client, but this requires a lot more complex
IPC interface and will not work when the server is down.
2019-12-13 17:31:35 +03:00
fox.cpp
9e5bb288b3
Fix a bunch of grammar errors in messages around the code base 2019-12-13 17:31:35 +03:00
fox.cpp
dae3d5bd09
endpoint/smtp: Finalize the LMTP support
Closes #137.
2019-12-07 05:42:11 +03:00
fox.cpp
bf188e454f
Move most code from the repo root into subdirectories
The intention is to keep to repo root clean while the list of packages
is slowly growing.

Additionally, a bunch of small (~30 LoC) files in the repo root is
merged into a single maddy.go file, for the same reason.

Most of the internal code is moved into the internal/ directory. Go
toolchain will make it impossible to import these packages from external
applications.

Some packages are renamed and moved into the pkg/ directory in the root.
According to https://github.com/golang-standards/project-layout this is
the de-facto standard to place "library code that's ok to use by
external applications" in.

To clearly define the purpose of top-level directories, README.md files
are added to each.
2019-12-06 01:35:12 +03:00