Age | Commit message (Collapse) | Author |
|
that was specially handled before. On the control socket fdpassing needs
to be enabled when a IMSG_CTL_SMTP_SESSION message is received.
OK tb@
|
|
rquires the caller to enable fdpassing.
OK tb@
|
|
Just use "read error" since the code also uses "write error" for the
imsg_flush case.
OK tb@
|
|
Adjust that one as well apart from that the conversion to the new
imsgbuf_read read behaviour is trivial.
OK tb@
|
|
OK tb@
|
|
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.
This separates the imsgbuf API from the per-imsg API.
OK tb@
|
|
OK tb@
|
|
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.
OK tb@
|
|
OK tb@
|
|
|
|
prompted by mail from illya meyer
ok gilles
|
|
(it is, but only for root, which i'll address in separate commit);
ok mp gilles
|
|
|
|
|
|
Reported by renegm on GitHub:
<https://github.com/OpenSMTPD/OpenSMTPD/issues/1257>
ok gilles@
|
|
from philipp plus openbsd at bureaucracy de
- within the "ca" section, refer to "listen on" and "action ... relay",
which is the actual syntax
ok op
|
|
ok op
|
|
table for non-crypt(3) authentication. tables configured with auth that
support K_AUTH are asked to check if a user and passwd are valid rather
than asked to provide the password for a user so smtpd does crypt(3) on
its side. helps with cases like ldap or custom auth.
ok op@
|
|
leave prototypes with functions in OpenSMTPD-extras
ok op@
|
|
ok gilles@
|
|
The error message is not really used, it just gets translated to a
TEMPFAIL, but it allows to have mandatory logging of errors instead
of relying on tables to hopefully log something.
To ease the transition, don't make it mandatory in smtpd(8) yet,
but document it as such.
ok millert@, gilles@
|
|
while here also do a s/fatalx/fatal since getline() sets errno on
failure.
ok millert@, gilles@
|
|
ok gilles@
|
|
point out that it is supposed to wrap around and fix the misleading
example, then highlight that not-found can only be returned by empty
tables.
ok gilles@
|
|
|
|
This adds "config|protocol|0.7" during the filters handshake, like
was done for the tables too, so that the filters can know the version
of the protocol right from the start.
ok gilles@
|
|
|
|
|
|
|
|
|
|
|
|
Using imsg for the "proc" table (external programs) has proven quite
painful in practice since a lot of smtpd internals (structs, enums,
etc..) have to be kept in sync with the various tables implementations.
Instead, a filter-like protocol for tables decouples the implementations
and allows to write and test tables easily.
The new text-based transport protocol is documented in the (added)
smtpd-tables(7) manpage.
The old imsg protocol is no longer supported and existing tables have to
be converted. In particular, users of opensmtpd-extras tables will need
install the new opensmtpd-table-* packages.
With lots of suggestions and improvements from gilles and a tweak
from Philipp (philipp+openbsd [at] bureaucracy [dot] de), thanks!
ok gilles
|
|
|
|
The file parser splits the line on the ':' character too for key-value
tables, and so mis-parses IPv6 addresses. The "::1 localhost" example
in table(5) is actually parsed as key "" and value ":1 localhost".
For list tables, the "# @list" marker can be used as a workaround, but
for key-valued the parser has to be fixed.
There are also some weird edge cases when splitting the lines.
Now the parser always splits on the first whitespace or colon, and then
strips the spaces. For lines starting with '[' the parser will jump to
the matching ']' before attempting to split. So, for example:
[::1]:localhost becomes "[::1]" -> "localhost"
[::1] example.org becomes "[::1]" -> "example.org"
foo: bar becomes "foo" -> "bar"
foo::bar becomes "foo" -> ":bar"
foo : bar becomes "foo" -> ": bar"
etc...
This only affects the parser for file table(5)s and makemap(8). Inline
tables or "proc" tables are unaffected.
ok gilles@
|
|
|
|
ok tb@
|
|
|
|
due to a swapped strlcpy() arguments we don't save the ORCPT argument
after validation. There's no buffer overflow since dsn_orcpt is zeroed.
Spotted by Tassilo Philipp, thanks!
ok millert gilles
|
|
- add a pointer to the section when documenting the `mda' keyword
- rename the section to MDA COMMANDS
- document also what happens when the MDA doesn't exit with status 0
- add the missing environment variables
- sort the variables
- minor other tweaks to the text
with several improvements from jmc, ok jmc
|
|
this adds some initial commentary for how MDAs should behave and
in what environment they are executed.
diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de) with
some tweaks from Richard Toohey and me.
ok gilles@
|
|
mostly for compatibility with postfix since some mdas (like
public-inbox) make use of it.
diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de)
ok gilles@
|
|
|
|
this prevents the reuse of T_HASH tables in T_LIST contexts when the key
column actually makes sense by itself.
diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de)
|
|
These are supposed to parse the same file format but have subtle
difference in the handling of comments, continuation lines and escaping.
Converge both to the simpler smtpd parser which doesn't handle
continuation lines nor escaping, and support comments only at the start
of the line.
improvements and ok millert@
|
|
|
|
The mbox delivery is handled apart from the other delivery methods.
Since the mda is already hardcoded in mda_mbox(), there's no need to
fill the command string in parse.y. While here also assess that for
mbox deliveries the command is unset at delivery time too.
based on a diff by gilles
ok gilles@, millert@
|
|
dispatcher, no .forward file except that of the alternate delivery user
is processed.
ok gilles@, millert@
|
|
any recipient .forward file except that of the alternate delivery user.
ok millert@
|
|
in a .forward file so disallow custom commands and file reading, only allow
setting forward addresses and users.
as root is no longer allowed to run any MDA but mbox, we can be stricter on
the setup of the MDA process and refuse to exec anything that's not an mbox
dispatcher.
tested by op@ who edited a root envelope to simulate an exploit injecting a
custom command in a root envelope, smtpd refused to exec.
ok millert@ and op@
|
|
This is a backout of revision 1.278. Delivery via lmtp is not
limited to running mail.lmtp, it may also be modified by a user's
.forward file (if any). OK gilles@
|