summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka.c
AgeCommit message (Collapse)Author
2024-06-11smtpd: fix indentTheo Buehler
ok op
2024-06-09introduce a new K_AUTH service to allow offloading the credentials to aGilles Chehade
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@
2024-01-20Use imsg_get_fd() to access the fd passed via imsgs.Claudio Jeker
Most of the conversion is simple there is just log_imsg() that can no longer display the fd since imsg_get_fd() can only be called once. OK op@
2021-06-14add required headers for smtpd.h and remove unnecessary ones in other files.Eric Faurot
ok jung@
2021-05-26replaces calls to err(3)/errx(3) with fatal()/fatalx() from log.cEric Faurot
for code that runs in the daemon. ok florian@ millert@
2021-04-21unplug unused certificate verification code, now that this is done by libtls.Eric Faurot
ok tb@ millert@
2020-12-31Rename the pony process to dispatcher and klondike to crypto.Martijn van Duren
From gilles@ OK millert@ giovanni@
2019-12-21do not pass rdns, fcrdns, ss_src and ss_dest with IMSG_FILTER_SMTP_BEGIN,Gilles Chehade
but gather the information from the link-connect reporting event instead. this removes redundant code and makes it easier to prepare for smtp-out.
2019-12-18teach relay action how to do domain-based relay host, this allows declaringGilles Chehade
a single relay action with a mapping of relay hosts per domain. ok eric@
2019-12-12filter protocol has an initial handshake within which smtpd tells filtersGilles Chehade
about a few global configuration informations. this makes smtpd tell proc filters for which subsystem they are registered allowing them to register only events that are relevant.
2019-08-28Add a link-greeting report. This allows us to get the active domain nameMartijn van Duren
in use for the current request. OK gilles@
2019-07-26even though RSET can be issued outside a tx, RFC states it's noop outside aGilles Chehade
transaction so rename link-reset to tx-reset and only issue the smtp report when a reset _actually_ has a side-effect. note that rset is implicit on a message commit or rollback, so tx-reset get issued even though there was no explicit RSET. the filters are MUCH simpler to write when you don't need to track every event that can reset a tx :-)
2019-07-11introduce link-auth to the smtp reporting stream so that filters may knowGilles Chehade
if a link has been authenticated successfully or not and for which user
2019-07-11modify link-identify so it reports if HELO or EHLO was usedGilles Chehade
2019-07-11introduce link-reset to let smtpd report resets happening in a sessionGilles Chehade
2019-06-27Allow filters to log information through stderr. This simplifies andMartijn van Duren
unifies the way filters need to get their logging to the right location. Log-messages are read line by line and are logged at LOG_ERR level via the lookup process. OK gilles@
2019-06-13extend the resolver interface to delegate res_query() calls to the lka.Eric Faurot
ok gilles@ sunil@
2019-01-05introduce smtp 'timeout' reporting event to notify filters that a timeoutGilles Chehade
occured during the smtp session
2018-12-28remove the tag workaround for table_create() and table_find(),Eric Faurot
now that static tables handle their updates internally. ok gilles@
2018-12-26reorder parameters for consistencyEric Faurot
2018-12-26get rid of the unused dict argument in table lookup and fetch api.Eric Faurot
ok gilles@
2018-12-23remove dead codeEric Faurot
ok gilles@
2018-12-21bring in new grammar for filters, allowing filter chains and plugging ofGilles Chehade
different filters & chains on different interfaces. in this diff, proc filters are still disabled as they're missing on very important piece of logic. ok eric@
2018-12-13in event reports, use a struct timeval instead of time_t since we want moreGilles Chehade
than second precision discussed with eric@
2018-12-12add tx-data reporting eventGilles Chehade
2018-12-11do some imsg renaming to make them more clearGilles Chehade
2018-12-11factor smtp-in and smtp-out reporting codeGilles Chehade
2018-12-11report filter responses to smtpGilles Chehade
2018-12-11generate an event when a helo name identifies a linkGilles Chehade
2018-12-09no longer pass rdns in all filtering requests, they can be retrieved fromGilles Chehade
the filter session.
2018-12-09add client and listener address, as well as client rDNS and FCrDNS lookupGilles Chehade
result to the filter_session structure upon filter session allocation. it will allow me to simplify all filter hooks.
2018-12-07Refactor certificate initialization and verification.Eric Faurot
Factorize code duplicated in smtp_session.c and mta_session.c Implement a simple callback interface, with proper request management and simplified imsg protocol. Only add the necessary parts for now. Exisiting code path will be adapted later. input from gilles@ sunil@ ok gilles@
2018-12-06link-connect event report had an empty fcrdns field, but now that eric@ hasGilles Chehade
plugged fcrdns in the smtp_session we can fill the field with a value
2018-12-06introduce tx-mail and tx-rcpt report eventsGilles Chehade
2018-12-06bring the first bits of DATA filtering plumbing but bypass it for nowGilles Chehade
ok eric@
2018-11-30prepare for smtp-out reporting and while at it, make a few changes to theGilles Chehade
report format
2018-11-08when reporting tx events, report tx idGilles Chehade
when reporting tx commit, report data size report tx-envelope events
2018-11-03check-rdns builtin filter, to be improvedGilles Chehade
2018-11-03bring plumbing for builtin filtersGilles Chehade
ok millert@, eric@, jung@
2018-11-02report rDNS in link connect eventGilles Chehade
2018-11-02pass struct sockaddr_storage instead of ss_to_text() in reportingGilles Chehade
2018-11-01teach smtp process how to report smtp events to lka and teach lka how toGilles Chehade
report these events to a proc ok millert@
2018-11-01allow smtpd to fork processes at startup and maintain a socketpair withGilles Chehade
them. ok jung@, eric@
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-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-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-29no need to parse and dump the relayhost in the lookup process.Eric Faurot
ok gilles@
2018-05-24switch smtpd to new grammarGilles Chehade
ok eric@
2018-01-03Use crypt_checkpass(3) instead of crypt(3).Sunil Nimmagadda
Based on a diff from Edgar Pettijohn. Ok gilles@ eric@
2017-11-27Show correct command execution status by checking against updateSunil Nimmagadda
operation return value. Issue reported by 'Zelest' (Jesper Wallin). Suggestions and ok eric@ gilles@.