diff --git a/.gitattributes b/.gitattributes index 55a444c5..9ea9afb4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -500,6 +500,7 @@ install/upgrades/3.0.0~2.sh -text install/upgrades/3.0.0~3.php -text install/upgrades/3.0.0~4.sh -text install/upgrades/3.0.1.php -text +install/upgrades/3.0.3~a.sql -text install/upgrades/3.1.0~a.sql -text install/upgrades/3.1.0~b.php -text install/upgrades/README -text diff --git a/install/upgrades/3.0.3~a.sql b/install/upgrades/3.0.3~a.sql new file mode 100644 index 00000000..e8d1e59d --- /dev/null +++ b/install/upgrades/3.0.3~a.sql @@ -0,0 +1,18 @@ +CREATE OR REPLACE VIEW `alias_view` AS +select concat(`address`.`address`,'@',`domaines`.`domaine`) AS `mail`, +concat(if(isnull(`mailbox`.`id`),'',concat(concat(`address`.`address`,'@',`domaines`.`domaine`),'\n')),`recipient`.`recipients`) AS `alias` +from (((`recipient` join `address` on((`address`.`id` = `recipient`.`address_id`))) +left join `mailbox` on((`mailbox`.`address_id` = `address`.`id`))) +join `domaines` on((`domaines`.`id` = `address`.`domain_id`))) +where `address`.`enabled` = 1 +union +select distinct concat(`m`.`login`,'@',`v`.`value`) AS `mail`, +`m`.`mail` AS `alias` +from ((`membres` `m` join `variable` `v`) join `domaines` `d`) +where (`v`.`name` = 'mailname_bounce') +union +select distinct concat('alterncpanel','@',`v`.`value`) AS `mail`, +`m`.`mail` AS `alias` +from ((`membres` `m` join `variable` `v`) join `domaines` `d`) +where (`v`.`name` = 'mailname_bounce' AND `m`.`uid`=2000); +