diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2020-01-08 00:30:45 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2020-01-08 00:30:45 +0000 |
commit | 722bae1baf27b4bde4efaaf3f05304436fea5ec4 (patch) | |
tree | 502e3e55dd624db2c28be6e8e45b35cc26c7e013 /usr.sbin | |
parent | f5288080652165b0b9119e89f8961a3b190ef0cd (diff) |
emable builtin filtering for phase DATA, no idea why we didn't earlier as
the grammar allowed it and the code was already there.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index d8d0652b03c..f4e5a8d2589 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.57 2019/12/21 11:47:34 gilles Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.58 2020/01/08 00:30:44 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -54,6 +54,7 @@ static int filter_builtins_connect(struct filter_session *, struct filter *, uin static int filter_builtins_helo(struct filter_session *, struct filter *, uint64_t, const char *); static int filter_builtins_mail_from(struct filter_session *, struct filter *, uint64_t, const char *); static int filter_builtins_rcpt_to(struct filter_session *, struct filter *, uint64_t, const char *); +static int filter_builtins_data(struct filter_session *, struct filter *, uint64_t, const char *); static void filter_result_proceed(uint64_t); static void filter_result_junk(uint64_t); @@ -95,7 +96,7 @@ static struct filter_exec { { FILTER_AUTH, "auth", filter_builtins_notimpl }, { FILTER_MAIL_FROM, "mail-from", filter_builtins_mail_from }, { FILTER_RCPT_TO, "rcpt-to", filter_builtins_rcpt_to }, - { FILTER_DATA, "data", filter_builtins_notimpl }, + { FILTER_DATA, "data", filter_builtins_data }, { FILTER_DATA_LINE, "data-line", filter_builtins_notimpl }, { FILTER_RSET, "rset", filter_builtins_notimpl }, { FILTER_QUIT, "quit", filter_builtins_notimpl }, @@ -1239,6 +1240,12 @@ filter_builtins_rcpt_to(struct filter_session *fs, struct filter *filter, uint64 filter_check_rcpt_to_regex(filter, param); } +static int +filter_builtins_data(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param) +{ + return filter_builtins_global(fs, filter, reqid); +} + static void report_smtp_broadcast(uint64_t, const char *, struct timeval *, const char *, const char *, ...) __attribute__((__format__ (printf, 5, 6))); |