summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
AgeCommit message (Collapse)Author
2018-09-19rename the ill-named "flags" member to "as_host" in domain structure.Eric Faurot
remove yet another useless relay flag while there. ok gilles@
2018-09-17simplify code path for backup relay and remove useless flagEric Faurot
ok gilles@
2018-09-08use symbolic integer values for the different tls options when relaying,Eric Faurot
rather than a confusing set of flags. ok gilles@
2018-09-04upon mda failure, smtpd would assume tempfail and retry. this is at oddsGilles Chehade
with the other MTA which assume a permfail unless the exit status is one of a specific set. make smtpd honour the same exit statuses as postfix. note that all errors that occur before the user mda is executed (fork, pipe and related) are still considered tempfail, only errors coming from the mda itself are handled as permfail. this commit is a temporary solution as i believe the SIGCHLD handler is way more complex than it should be and we'll simplify it after 6.4 is out. ok eric@
2018-08-31switch to improved incoming message parser:Eric Faurot
- simpler interface not using callbacks - no hard-coded line length - avoid unnecessary string copy ok gilles@
2018-07-25Implement a generic interface to forward resolver queries to the lkaEric Faurot
process. Use it for the reverse lookups required by smtp and mta. Until now, DNS-related lookups were implemented using ad-hoc IMSGs between the lka and other processes. It turns out to be confusing and difficult to maintain/extend. So we want to replace this with a better set of IMSGs matching the standard resolver interface. ok gilles@
2018-06-18simplify parse_config() further so it no longer has any side effect outsideGilles Chehade
of parse.y, there's still work to be done but it's now able to run twice if we want (we don't) without failing due to some global side-effect. ok millert@
2018-06-18split smtp_accept() in two parts: the accept part, the session init part,Gilles Chehade
while at it allow smtp_session() to receive a pre-allocated struct io ok millert@ diff contributed by Antoine Kaufmann
2018-06-16rework the table API so that it takes a struct smtpd * context in parameterGilles Chehade
of functions creating, looking up or destroying tables. this is a first step in cleaning up parse.y so it doesn't have side effects outside of parse_config(), bringing nothing but making code cleaner. ok millert@
2018-06-07remove unused flags and obsolete commentsEric Faurot
ok gilles@
2018-06-06remove fields that are found in struct dispatcher from struct relayhostEric Faurot
ok gilles@
2018-06-05remove struct relayhost from struct envelope.Eric Faurot
ok gilles@
2018-06-04add support for mda wrappers allowing postmaster to define command wrappersGilles Chehade
that will be executed (with recipient privileges) before calling the users' mail delivery agent ok eric@
2018-06-03split forkmda() in two:Gilles Chehade
- forkmda() creates the process that will be used for the delivery and does the switching of privileges then calls mda_unpriv() - mda_unpriv() runs with privileges of the recipient, it expands variables, sets up environment and executes the mda ok millert@ and eric@
2018-06-01Require a valid certificate by default when relaying through a smarthost.Eric Faurot
Add "tls no-verify" relay option to disable it. suggested and initial diff by semarie@. ok gilles@
2018-05-31remove 'where' parameter from all x*() functions in utils.c, it doesn'tGilles Chehade
really help us with anything, propagate the change in codebase ok millert@
2018-05-29remove unused functionEric Faurot
ok gilles@
2018-05-29no need to parse and dump the relayhost in the lookup process.Eric Faurot
ok gilles@
2018-05-29provide mail user agents with the same environments as PostfixGilles Chehade
ok millert@, eric@
2018-05-24bump version, this will be a big release when OpenBSD 6.4 is released :-)Gilles Chehade
2018-05-24switch smtpd to new grammarGilles Chehade
ok eric@
2018-05-14kill corrupt / uncorrupt queue mechanism as it has never been usable and itGilles Chehade
will be made irrelevant when the new config comes up soon ok eric@
2018-04-26sync log.h with other daemonsEric Faurot
ok gilles@
2018-03-14bump minor version just to be sure it makes release :-)Gilles Chehade
ok gilles@
2018-01-02we haven't updated the version in a while despite many commits which isGilles Chehade
confusing for people running the portable version
2017-09-08remove more filter-related cruftEric Faurot
ok gilles@
2017-08-13bypass the filter code for incoming smtp sessions.Eric Faurot
experimental support for filters has been removed from the config parser already, and we want to get rid of the remaining code. ok gilles@
2017-08-04the PURGE_EVERYTHING flag used to purge config bits was inaccurateGilles Chehade
ok eric@
2017-07-27smtpctl(8): Use an int to determine mode instead of __progname.Sunil Nimmagadda
Ok millert@ gilles@
2017-05-26move variables expansion out of lka_session into their own file, this is aGilles Chehade
mechanical diff to simplify a bit the lka code and prepare for moving variables outside of the lookup process into the chrooted mda process. no functional change for now. ok eric@
2017-05-22- filters are currently broken, do not allow using them until we're doneGilles Chehade
2017-02-13allow negation of authenticated keyword:Gilles Chehade
accept ! authenticated [...] ok sunil@, jung@
2017-02-03Stop assuming that in_{addr,port}_t are typedefed in <sys/types.h> andPhilip Guenther
instead pull in <netinet/in.h> or <arpa/inet.h> when those are needed. ok florian@ beck@ millert@
2017-01-09smtpd joins the 7 other daemons that share the same log.c file.Reyk Floeter
The only major difference was the "log_trace" concept that is only used by smtpd - move it from log.c into util.c and make it a local concept. This also needed to rename the global "verbose" variable to "tracing" in a few places. OK krw@ gilles@ eric@
2016-11-30remove unused iobuf helpersEric Faurot
2016-11-30make struct io opaque:Eric Faurot
- move struct io definition to ioev.c - replace io_init/io_clear with io_new/io_free - allocate an iobuf for each new io internally - use struct io pointer in the rest of the code - remove remaining uses of iobuf_* ok gilles@ sunil@
2016-11-25assign an id to each rule in the ruleset, first step towards an MTA layerGilles Chehade
and scheduler simplification ok eric@
2016-11-17Add io api functions for dealing with buffered data, as wrapper aroundEric Faurot
their iobuf counterparts. ok gilles@ sunil@
2016-09-04Remove the "smtpctl stop" command.Eric Faurot
The daemon is stopped with kill(1). ok gilles@
2016-09-03get rid of the type-checking system on internal messages.Eric Faurot
bump all imsg protocol versions since message format changed. ok gilles@ sunil@
2016-09-01remove noop functionEric Faurot
ok sunil@
2016-09-01get rid of the imsg buffer usage profiling code.Eric Faurot
ok gilles@ jung@ sunil@
2016-08-31Remove dead code. queue_flow_control() has never been used and isEric Faurot
probably a bad idea. ok gilles@
2016-08-31introduce "authenticated" parameter so rules may apply to authenticatedGilles Chehade
sessions specifically ok eric@, sunil@, jung@
2016-08-31allow overriding the subaddressing delimiter with subaddressing-delimiterGilles Chehade
keyword, the default is still + ok eric@, sunil@
2016-07-24bump versionGilles Chehade
ok deraadt@
2016-05-28Implement the fork+exec pattern in smtpd.Eric Faurot
The parent process forks child processes and re-exec each of them with an additional "-x <proc>" argument. During the early setup phase, the parent process sends ipc socket pairs to interconnect the child processes as needed, and it passes the queue encryption key to the queue if necessary. When this is done, all processes have their environment set as in the fork-only case, and they can start doing their work as before. ok gilles@ jung@
2016-03-25Nuke session_socket_blockmode() and session_socket_linger(). UseKenneth R Westerback
the identical io_set_blocking() and io_set_linger(). Since both are always called to turn off blocking or lingering, nuke the parameter and associated enum in favour of "just doing the right thing". While passing remove the unneeded last parameter to the remaining fcntl(F_GETFL). Finally, rename the functions to io_set_nonblocking() and io_set_nolinger() for clarity. No functional change. Started with a sweep of fcntl() usage inspired by guenther@. ok gilles@
2016-02-21bump versionGilles Chehade
2016-02-13handle enqueuer socket as a regular listener that can be configured withGilles Chehade
"listen on socket". this simplifies a bit of code, removes some special cases and will allow attaching filters & masking source just as on lo0. diff from Peter Bisroev <peter@int19h.net> ok gilles@, jung@