ZhangHuangbin wrote:*) Is this plugin tight to iRedMail? or just a general Roundcube plugin which should work for all Roundcube setup (including iRedMail and non-iRedMail)?
*) MIT license is nice.
*) I understand you want to leave some footprint in your work, but no footprint is another footprint. so, how about rename the plugin, and remove 'webdevguru', 'wdg' string in function/class names in source code? Just a suggestion, it's up to you.
*) 80 characters per line in config.inc.php.dist is better, but not big deal.
*) What's Whitelist and Blacklist mentioned in config.inc.php.dist?
*) No option (wdg_sql_mode) for "Show Users from the same Domain without white/blacklist"?
*) Again, how about access `vmail` database directly instead of creating a VIEW? We can ask system admin to add required SQL username/password in config file. This way we don't need to create additional VIEW or SQL table.
*) Any plan to show mail alias account in address book? Maybe placed under group "Mail List" instead of mixed with mail users.
It is tied to the view for two reasons, security through obscurity, an admin can rest assured that I do not have permissions to read their pass hashes because I literally can't access them. But also I can create a different view for different mail systems, the .sql file is named iredmail.sql because it creates the view to make the plugin compatible with iredmail systems.
I will be removing the footprint by the next version, Whitelist means show only certain domains, Blacklist means hide specific domains, setting either of those to NULL [default] will disable Whitelisting or Blacklisting.
Mail Alias I am considering adding, but that'll be a later version.
On version2 [complete rewrite] I'll be using a Ruler of 120 with a soft ruler of 80.
So to Show Users from the same Domain without White/Blacklist, you just select 0, 1 or 2 and leave whitelist and blacklist NULL. If you have 5 domains, one of which you want to hide, just add it to the blacklist array for example. I will create a Readme file explaining this. The new config [v2] currently looks like so:
//All Books Support the Whitelist of '*', it is implied.
//Therefore a blacklist of '*' is not supported as it is like a WL of nothing.
//The `Support Book` is an Address Book which will not get shown to members of itself.
//The definition does not support any placeholders, can support multiple domains per book.
//The definition can also support multiple books, the definition goes like:
// array(array('Support Book', 'webdevguru.co.uk', 'support.co.uk'), array(...))
//Multidimensional Array, of no limit, first sub-element is the Specified Name of the Support Book.
// The rest of the elements are the Domains that should be within that Support Book.
$config['wdg_sql_supportbook'] = array();
//The `Domain Book` is an Address Book which will contain all the members which have the same
//e-mail domain as the logged in user themself, the only values for configuration are:
//NULL for disable, a string in an array as the name of the `Domain Book`.
//READ Rules, in format {array(whitelist), array(blacklist)} for who can see this Book.
//DATA Rules, in format {array(whitelist), array(blacklist)} for what data is loaded.
//Default for both rules is Everything/Everyone is whitelisted and nothing Blacklisted.
$config['wdg_sql_domainbook'] = NULL;
$config['wdg_sql_domainbook_read'] = array(array('*'), array());
$config['wdg_sql_domainbook_data'] = array(array('*'), array());
//The `Global Book` is an Address Book which will contain all the members of the Database View
//Configure as NULL for disable or a string in an array as the name of the `Global Book`.
//READ Rules, in format {array(whitelist), array(blacklist)} for who can see this Book.
//DATA Rules, in format {array(whitelist), array(blacklist)} for what data is loaded.
//Default for both rules is Everything/Everyone is whitelisted and nothing Blacklisted.
$config['wdg_sql_globalbook'] = NULL;
$config['wdg_sql_globalbook_gp'] = true;
$config['wdg_sql_globalbook_read'] = array(array('*'), array());
$config['wdg_sql_globalbook_data'] = array(array('*'), array());
//To be implemnted: `Custom Books`
VERSION 2 PUSHED, Let me know what you think Zhang:
https://github.com/t3chguy/Roundcube-SQ … s/releases