aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qmail-remote/qmail-remote.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qmail-remote/qmail-remote.c b/src/qmail-remote/qmail-remote.c
index e993493..49c13e1 100644
--- a/src/qmail-remote/qmail-remote.c
+++ b/src/qmail-remote/qmail-remote.c
@@ -176,8 +176,7 @@ int main (int argc, char const *const *argv)
{
size_t hostlen = strlen(host) ;
for (size_t i = 0 ; i < hostlen ; i++) if (host[i] == '.')
- if (smtproutes_match(&routes, argv[1], &storage, &hostpos, &port)) break ;
- if (!hostpos) smtproutes_match(&routes, "", &storage, &hostpos, &port) ;
+ if (smtproutes_match(&routes, host + i + 1, &storage, &hostpos, &port)) break ;
}
smtproutes_free(&routes) ;
}