From ede346fd84e765ba5548bba8080a76a06847980e Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Mon, 15 Aug 2016 23:02:54 +0200 Subject: [PATCH] Foward to shorter wildcard aliases first, related to #38 --- postfix/conf/sqlite-virtual_alias_maps.cf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postfix/conf/sqlite-virtual_alias_maps.cf b/postfix/conf/sqlite-virtual_alias_maps.cf index 8047e826..8accf7c5 100644 --- a/postfix/conf/sqlite-virtual_alias_maps.cf +++ b/postfix/conf/sqlite-virtual_alias_maps.cf @@ -13,5 +13,6 @@ query = '%s' LIKE alias.email ) ORDER BY - alias.wildcard ASC + alias.wildcard ASC, + length(alias.localpart) DESC LIMIT 1