aboutsummaryrefslogtreecommitdiffstats
path: root/usr.sbin/smtpd/spfwalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/spfwalk.c')
-rw-r--r--usr.sbin/smtpd/spfwalk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/smtpd/spfwalk.c b/usr.sbin/smtpd/spfwalk.c
index 0832d1bc..d23f43a1 100644
--- a/usr.sbin/smtpd/spfwalk.c
+++ b/usr.sbin/smtpd/spfwalk.c
@@ -124,7 +124,17 @@ lookup_record(int type, const char *record, struct target *tgt)
{
struct asr_query *as;
struct target *ntgt;
+ size_t i;
+ if (strchr(record, '%') != NULL) {
+ for (i = 0; record[i] != '\0'; i++) {
+ if (!isprint(record[i]))
+ record[i] = '?';
+ }
+ warnx("%s: %s contains macros and can't be resolved", __func__,
+ record);
+ return;
+ }
as = res_query_async(record, C_IN, type, NULL);
if (as == NULL)
err(1, "res_query_async");