diff --git a/src/doveadm/doveadm-director.c b/src/doveadm/doveadm-director.c index fb7d96fbc4..42c472759d 100644 --- a/src/doveadm/doveadm-director.c +++ b/src/doveadm/doveadm-director.c @@ -469,6 +469,13 @@ cmd_director_add_or_update(struct doveadm_cmd_context *cctx, bool update) director_cmd_help(cctx->cmd); return; } + if (str_to_uint(host, &i) == 0) { + /* host is a number. this would translate to an IP address, + which is probably a mistake. */ + i_error("Invalid host '%s'", host); + director_cmd_help(cctx->cmd); + return; + } host = ctx->host; if (ctx->tag == NULL) {