diff options
author | Gilles Chehade <gilles@poolp.org> | 2019-08-11 19:49:35 +0200 |
---|---|---|
committer | Gilles Chehade <gilles@poolp.org> | 2019-08-11 19:49:35 +0200 |
commit | 87f5868da0f71fde00c2d5bd009a84ba00f17b9b (patch) | |
tree | ad9c859e5bde0e2eb97d3a4f798883109b3aa15f /smtpd/to.c | |
parent | sync (diff) | |
download | OpenSMTPD-87f5868da0f71fde00c2d5bd009a84ba00f17b9b.tar.xz OpenSMTPD-87f5868da0f71fde00c2d5bd009a84ba00f17b9b.zip |
sync
Diffstat (limited to 'smtpd/to.c')
-rw-r--r-- | smtpd/to.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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); |