aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r--src/mail/ngx_mail.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c
index 49ec2e05b..b097778db 100644
--- a/src/mail/ngx_mail.c
+++ b/src/mail/ngx_mail.c
@@ -539,6 +539,11 @@ ngx_mail_cmp_conf_addrs(const void *one, const void *two)
return 1;
}
+ if (second->wildcard) {
+ /* a wildcard must be the last resort, shift it to the end */
+ return -1;
+ }
+
if (first->bind && !second->bind) {
/* shift explicit bind()ed addresses to the start */
return -1;