aboutsummaryrefslogtreecommitdiffstats
path: root/smtpd/to.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2019-08-11 19:49:35 +0200
committerGilles Chehade <gilles@poolp.org>2019-08-11 19:49:35 +0200
commit87f5868da0f71fde00c2d5bd009a84ba00f17b9b (patch)
treead9c859e5bde0e2eb97d3a4f798883109b3aa15f /smtpd/to.c
parentsync (diff)
downloadOpenSMTPD-87f5868da0f71fde00c2d5bd009a84ba00f17b9b.tar.xz
OpenSMTPD-87f5868da0f71fde00c2d5bd009a84ba00f17b9b.zip
sync
Diffstat (limited to 'smtpd/to.c')
-rw-r--r--smtpd/to.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/smtpd/to.c b/smtpd/to.c
index e9b95ca6..36907381 100644
--- a/smtpd/to.c
+++ b/smtpd/to.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: to.c,v 1.37 2019/07/24 20:44:21 kn Exp $ */
+/* $OpenBSD: to.c,v 1.39 2019/08/11 17:23:12 gilles Exp $ */
/*
* Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -458,7 +458,16 @@ rule_to_text(struct rule *r)
if (r->flag_from) {
if (r->flag_from < 0)
(void)strlcat(buf, "!", sizeof buf);
- if (strcmp(r->table_from, "<anyhost>") == 0)
+ if (r->flag_from_socket)
+ (void)strlcat(buf, "from socket ", sizeof buf);
+ if (r->flag_from_rdns) {
+ (void)strlcat(buf, "from rdns ", sizeof buf);
+ if (r->table_from) {
+ (void)strlcat(buf, r->table_from, sizeof buf);
+ (void)strlcat(buf, " ", sizeof buf);
+ }
+ }
+ else if (strcmp(r->table_from, "<anyhost>") == 0)
(void)strlcat(buf, "from any ", sizeof buf);
else if (strcmp(r->table_from, "<localhost>") == 0)
(void)strlcat(buf, "from local", sizeof buf);