Checks domain with too many aliasing levels.
authorStéphane Jacob <sj@m4x.org>
Sun, 6 Mar 2011 19:12:04 +0000 (20:12 +0100)
committerStéphane Jacob <sj@m4x.org>
Sun, 6 Mar 2011 19:12:04 +0000 (20:12 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
bin/cron/checkdb.php

index 5eef761..fee4057 100755 (executable)
@@ -210,6 +210,13 @@ check("SELECT  p.*
                                                       WHERE  p.link_id = g.id)",
       "Téléphones de type 'group' reliés à un groupe inexistant.");
 
+// List domain aliasing with depth higher than 1: they will not be found by postfix.
+check("SELECT  evd.name
+         FROM  email_virtual_domains AS evd
+   INNER JOIN  email_virtual_domains AS evd2 ON (evd.aliasing = evd2.id)
+        WHERE  evd2.id != evd2.aliasing",
+      "Domaines aliasés de niveau 2 ou plus qui ne sont pas vu par postfix.");
+
 // Counts empty profile fields that should never be empty.
 infoCountEmpty('profile_addresses', 'type');
 infoCountEmpty('profile_phones', 'link_type');