History log of /openbsd/usr.sbin/smtpd/ruleset.c (Results 1 – 25 of 48)
Revision Date Author Comments
# d3140113 14-Jun-2021 eric <eric@openbsd.org>

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@


# 7d9f71f9 25-Nov-2019 gilles <gilles@openbsd.org>

store smtp session username in envelope and allow ruleset to match specific
users or mailaddr:

match auth "gilles@openbsd.org" [...]
match auth "@openbsd.org" [...]

ok eric@


# 5845f8e6 12-Nov-2019 gilles <gilles@openbsd.org>

fix a logic bug in ruleset matching that makes `from socket` rules possibly
crash depending on how the ruleset is crafted.


# a847aaba 04-Nov-2019 gilles <gilles@openbsd.org>

fix a possible crash when combining "from rdns", nested virtual aliases and
a particular sequence of rules causing "from rdns" to be hit again from the
expanded aliases. this requires crafting a spec

fix a possible crash when combining "from rdns", nested virtual aliases and
a particular sequence of rules causing "from rdns" to be hit again from the
expanded aliases. this requires crafting a specific configuration.

show more ...


# a9b72af9 11-Aug-2019 gilles <gilles@openbsd.org>

add 'from rdns' to ruleset match criterias making it possible to match
envelopes created by sessions that had or did not have an rDNS:

match from rdns [...] action "local"
match !from rdns [

add 'from rdns' to ruleset match criterias making it possible to match
envelopes created by sessions that had or did not have an rDNS:

match from rdns [...] action "local"
match !from rdns [...] reject

show more ...


# 57bda1de 11-Aug-2019 gilles <gilles@openbsd.org>

properly implement the "from socket" match criteria, so it is now possible
to specifically match a connection that happened through the local enqueuer


# ff18143e 28-Dec-2018 eric <eric@openbsd.org>

remove the tag workaround for table_create() and table_find(),
now that static tables handle their updates internally.

ok gilles@


# 8ff50274 26-Dec-2018 eric <eric@openbsd.org>

simplify code

ok gilles@


# ef7a27e8 26-Dec-2018 eric <eric@openbsd.org>

introduce a table_match() function to check for a key in a table

ok gilles@


# 699c3f98 26-Dec-2018 eric <eric@openbsd.org>

get rid of the unused dict argument in table lookup and fetch api.

ok gilles@


# c229687e 22-Dec-2018 gilles <gilles@openbsd.org>

introduce new matching criteria 'from rdns' to match sessions based on rDNS
of the client, works with literal and tables, both string and regex:

match from rdns "mx1.poolp.org" for any action blahb

introduce new matching criteria 'from rdns' to match sessions based on rDNS
of the client, works with literal and tables, both string and regex:

match from rdns "mx1.poolp.org" for any action blahblah

show more ...


# 4614b657 21-Dec-2018 gilles <gilles@openbsd.org>

since we already support regex lookups in tables for builtin filters, let's
also support regex lookups in match rule criterias performing table lookups

ok millert@


# b80b41af 16-Jun-2018 gilles <gilles@openbsd.org>

rework the table API so that it takes a struct smtpd * context in parameter
of functions creating, looking up or destroying tables.

this is a first step in cleaning up parse.y so it doesn't have sid

rework the table API so that it takes a struct smtpd * context in parameter
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@

show more ...


# a8e22235 24-May-2018 gilles <gilles@openbsd.org>

switch smtpd to new grammar

ok eric@


# 5682134d 13-Feb-2017 gilles <gilles@openbsd.org>

allow negation of authenticated keyword:
accept ! authenticated [...]

ok sunil@, jung@


# 7e744a4a 31-Aug-2016 gilles <gilles@openbsd.org>

introduce "authenticated" parameter so rules may apply to authenticated
sessions specifically

ok eric@, sunil@, jung@


# 8d607117 27-Oct-2015 gilles <gilles@openbsd.org>

aliases_virtual_check() has been unneeded for a while

ok jung@, ok sunil@, ok millert@


# 953aae25 20-Jan-2015 deraadt <deraadt@openbsd.org>

use <limits.h> comprehensively. For now try to push <> includes to
each .c file, and out of the .h files. To avoid overinclude.
ok gilles, in principle. If this has been done right, -portable shou

use <limits.h> comprehensively. For now try to push <> includes to
each .c file, and out of the .h files. To avoid overinclude.
ok gilles, in principle. If this has been done right, -portable should
become easier to maintain.

show more ...


# d6f2ac01 08-Jul-2014 eric <eric@openbsd.org>

Update the table API: lookup functions can take an optional parameters
dictionnary (currently not set). While there, add a helper for forking
external backends, and remove unused table functions.

ok

Update the table API: lookup functions can take an optional parameters
dictionnary (currently not set). While there, add a helper for forking
external backends, and remove unused table functions.

ok gilles@

show more ...


# cc81b7c6 06-Nov-2013 eric <eric@openbsd.org>

Much much improved config parser and related changes.
Simplify code and do not impose an order on conditions and rule options.

Format changes that may require smtpd.conf update for some setups:

- S

Much much improved config parser and related changes.
Simplify code and do not impose an order on conditions and rule options.

Format changes that may require smtpd.conf update for some setups:

- SSL certificates are no longer automatically loaded, but must be
explicitely declared using the "pki" keyword.
- "certificate" option becomes "pki" in listener and accept rules.
- "ssl://" becomes "secure://" in relay via rules.
- "helo" becomes "hostnames" in relay rules

New features:

- accept rules do not need an explicit action, in which case alias table
or .forward must provide one.
- new "forward-only" action to force relaying and reject rcpts that expand
as local delivery.
- "!" (negation) modifier on rule matching conditions.
- new "recipient" rule matching condition.
- new "verify" option on listeners and relay rules to reject invalid
certificates.

Other changes:

- remember the helo name advertised on incoming mail and use it for sending
bounces.
- bump envelope version (existing envelopes are updated on-the-fly).

show more ...


# 299c4efe 24-May-2013 eric <eric@openbsd.org>

sync with OpenSMTPD 5.3.2

ok gilles@


# 65c4fdfb 26-Jan-2013 gilles <gilles@openbsd.org>

Sync with our smtpd repo:

* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of tem

Sync with our smtpd repo:

* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of temporary errors throughout the daemon
* improved scheduler and mta logic: connection reuse, optimizes batches
* improved queue: more tolerant to admin errors, new layout, less disk-IO
* improved memory usage under high load
* SSL certs/keys isolated to lookup process to avoid facing network
* VIRTUAL support improved, fully virtual setups possible now
* runtime tracing of processes through smtpctl trace
* ssl_privsep.c sync-ed with relayd
* ssl.c no longer contains smtpd specific interfaces
* smtpd-specific ssl bits moved to ssl_smtpd.c
* update mail address in copyright

FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE.

smtpd.conf(5) simplified, it will require adaptations

ok eric@

show more ...


# 82614934 12-Nov-2012 eric <eric@openbsd.org>

Cleanups and improvements:

* Log more events (especially client session) and use a better scheme
for that: each messages is prefixed with a token to easily identify
its class:
- info/warn/de

Cleanups and improvements:

* Log more events (especially client session) and use a better scheme
for that: each messages is prefixed with a token to easily identify
its class:
- info/warn/debug: general server messages
- smtp-in: smtp client connections
- relay: status update for relayed messages
- delivery: status update for local deliveries

* Implement "smtpctl monitor" to display updates of selected internal
counters.

* When reloading the on-disk queue at startup do not commit a message
if no envelope was submitted for that message.

* Remove unused stuff in the config parser.

ok gilles@

show more ...


# 5875f871 13-Oct-2012 eric <eric@openbsd.org>

Make map_lookup() and make_compare() set errno on failure to distinguish
between "no match" and "internal error" (e.g. missing or broken db file).
Adapt alias expansion and ruleset matching code to c

Make map_lookup() and make_compare() set errno on failure to distinguish
between "no match" and "internal error" (e.g. missing or broken db file).
Adapt alias expansion and ruleset matching code to check for such errors,
in which case the current processing is aborted, and a temporary failure
is reported to the smtp session.

ok gilles@

show more ...


# 526560bf 11-Oct-2012 gilles <gilles@openbsd.org>

- replace "from all" and "for all" with "from any" and "for any"

ok eric@, chl@


12