AliasHandler: restrict __is_mailbox subquery to allowed domains

This improves performance on setups with lots of mailboxes.
Well, except for superadmins because restricting to "all domains"
doesn't really help ;-)

Thanks to gygy for reporting this on IRC, and for testing the patch.



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1877 a1433add-5e2c-0410-b055-b7f2511e0802
pull/12/head
Christian Boltz 8 years ago
parent 4c2ff84d52
commit bd28fcb194

@ -12,6 +12,8 @@
Changes since the 3.0.1 release
-------------------------------------------------
- AliasHandler: restrict mailbox subquery to allowed domains to improve
performance (except for superadmins ;-) on setups with lots of mailboxes
- allow switching between dovecot:* password schemes while still accepting
passwords hashed using the previous dovecot:* scheme
- FetchmailHandler: use a valid date as default for 'date'

@ -48,6 +48,7 @@ class AliasHandler extends PFAHandler {
' SELECT 1 as __is_mailbox, username as __mailbox_username ' .
' FROM ' . table_by_key('mailbox') .
' WHERE username IS NOT NULL ' .
' AND ' . db_in_clause($this->domain_field, $this->allowed_domains) .
' ) AS __mailbox ON __mailbox_username = address' ),
'goto_mailbox' => pacol( $mbgoto, $mbgoto,$mbgoto,'bool', 'pEdit_alias_forward_and_store' , '' , 0,
/*options*/ '',

Loading…
Cancel
Save