summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/parse.y
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2018-05-25 14:10:29 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2018-05-25 14:10:29 +0000
commite78ddae93e3dac725f32c0a3469c5666a0b30289 (patch)
treeb6ce5c35f20c4054b334ec8f0817e2f430eeee28 /usr.sbin/smtpd/parse.y
parent944ed6b9ddeb2894593d85770ea95b91004c0c07 (diff)
default to from local and for local as we used to
spotted by millert@, ok eric@
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r--usr.sbin/smtpd/parse.y10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 2275e6a88df..dd46d9b4d3d 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.201 2018/05/24 11:38:24 gilles Exp $ */
+/* $OpenBSD: parse.y,v 1.202 2018/05/25 14:10:28 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -779,6 +779,14 @@ match:
MATCH {
rule = xcalloc(1, sizeof *rule, "rule");
} match_options action {
+ if (!rule->flag_from) {
+ rule->table_from = strdup("<localhost>");
+ rule->flag_from = 1;
+ }
+ if (!rule->flag_for) {
+ rule->table_for = strdup("<localnames>");
+ rule->flag_for = 1;
+ }
TAILQ_INSERT_TAIL(conf->sc_rules, rule, r_entry);
rule = NULL;
}