mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
* Setup: allow to enable account in AD via setup-cli.php and renamed --postfix and --cyrus options to more generic names --smtp and --imap
This commit is contained in:
parent
78efd4a604
commit
8d93ebb01e
@ -57,9 +57,11 @@ $config = array(
|
||||
'ldap_group_context' => 'ou=groups,$base',
|
||||
'mailserver' => '',
|
||||
'smtpserver' => 'localhost,25',
|
||||
'postfix' => '', // see setup-cli.php --help config
|
||||
'cyrus' => '',
|
||||
'smtp' => '', // see setup-cli.php --help config
|
||||
'imap' => '',
|
||||
'sieve' => '',
|
||||
'postfix' => '', // deprecated use 'smtp'
|
||||
'cyrus' => '', // deprecated use 'imap'
|
||||
'install-update-app' => '', // install or update a single (non-default) app
|
||||
'webserver_user'=> 'apache', // required to fix permissions
|
||||
);
|
||||
@ -312,7 +314,7 @@ if (!file_exists($config['header']) || filesize($config['header']) < 200) // def
|
||||
}
|
||||
// create mailserver config (fmail requires at least minimal config given as default, otherwise fatal error)
|
||||
$setup_mailserver = $setup_cli.' --config '.escapeshellarg($config['domain'].','.$config['config_user'].','.$config['config_passwd']);
|
||||
foreach(array('account-auth','smtpserver','postfix','mailserver','cyrus','sieve') as $name)
|
||||
foreach(array('account-auth','smtpserver','smtp','postfix','mailserver','imap','cyrus','sieve') as $name)
|
||||
{
|
||||
if (!empty($config[$name])) $setup_mailserver .= ' --'.$name.' '.escapeshellarg($config[$name]);
|
||||
}
|
||||
@ -508,6 +510,7 @@ function usage($error=null)
|
||||
echo "options and their defaults:\n";
|
||||
foreach($config as $name => $default)
|
||||
{
|
||||
if (in_array($name, array('postfix','cyrus'))) continue; // do NOT report deprecated options
|
||||
if (in_array($name,array('config_passwd','db_pass','admin_passwd','ldap_root_pw')))
|
||||
{
|
||||
$default = '<16 char random string>';
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package setup
|
||||
* @copyright (c) 2007-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2007-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -148,7 +148,13 @@ class setup_cmd_config extends setup_cmd
|
||||
'email (Standard Maildomain should be set)' => 'email',
|
||||
),'default'=>'standard'),
|
||||
),
|
||||
'--cyrus' => array(
|
||||
'--imap' => array(
|
||||
'imapAdminUsername',
|
||||
'imapAdminPW',
|
||||
array('name' => 'imapType','default' => 'defaultimap'),
|
||||
array('name' => 'imapEnableCyrusAdmin','default' => 'yes'),
|
||||
),
|
||||
'--cyrus' => array( // deprecated use --imap ,,cyrusimap
|
||||
'imapAdminUsername',
|
||||
'imapAdminPW',
|
||||
array('name' => 'imapType','default' => 'cyrusimap'),
|
||||
@ -159,7 +165,11 @@ class setup_cmd_config extends setup_cmd
|
||||
array('name' => 'imapSievePort','default' => 2000),
|
||||
array('name' => 'imapEnableSieve','default' => 'yes'), // null or yes
|
||||
),
|
||||
'--postfix' => array(
|
||||
'--smtp' => array(
|
||||
array('name' => 'editforwardingaddress','allowed' => array('yes',null)),
|
||||
array('name' => 'smtpType','default' => 'defaultsmtp'),
|
||||
),
|
||||
'--postfix' => array( // deprecated use --smtp ,postfixldap
|
||||
array('name' => 'editforwardingaddress','allowed' => array('yes',null)),
|
||||
array('name' => 'smtpType','default' => 'postfixldap'),
|
||||
),
|
||||
@ -167,7 +177,7 @@ class setup_cmd_config extends setup_cmd
|
||||
'smtp_server',array('name' => 'smtp_port','default' => 25),'smtp_auth_user','smtp_auth_passwd',''
|
||||
),
|
||||
'--account-auth' => array(
|
||||
array('name' => 'account_repository','allowed' => array('sql','ldap'),'default'=>'sql'),
|
||||
array('name' => 'account_repository','allowed' => array('sql','ldap','ads'),'default'=>'sql'),
|
||||
array('name' => 'auth_type','allowed' => array('sql','ldap','mail','ads','http','sqlssl','nis','pam'),'default'=>'sql'),
|
||||
array('name' => 'sql_encryption','allowed' => array('sha512_crypt','sha256_crypt','blowfish_crypt','md5_crypt','crypt','ssha','smd5','md5'),'default'=>'sha512_crypt'),
|
||||
'check_save_password','allow_cookie_auth'),
|
||||
@ -179,6 +189,14 @@ class setup_cmd_config extends setup_cmd
|
||||
'--ldap-group-context' => 'ldap_group_context',
|
||||
'--allow-remote-admin' => 'allow_remote_admin',
|
||||
'--install-id' => 'install_id',
|
||||
'--ads-host' => 'ads_host',
|
||||
'--ads-domain' => 'ads_domain',
|
||||
'--ads-admin-user' => 'ads_domain_admin', // eg. Administrator
|
||||
'--ads-admin-pw' => 'ads_admin_pw',
|
||||
'--ads-connection' => array(
|
||||
array('name' => 'ads_connection', 'allowed' => array('ssl', 'tls'))
|
||||
),
|
||||
'--ads-context' => 'ads_context',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -273,7 +291,7 @@ class setup_cmd_config extends setup_cmd
|
||||
}
|
||||
$values[$name] = $value;
|
||||
|
||||
return in_array($arg,array('--mailserver','--smtpserver','--cyrus','--postfix','--sieve'));
|
||||
return in_array($arg,array('--mailserver','--smtpserver','--imap','--cyrus','--smtp','--postfix','--sieve'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -482,11 +482,12 @@ function do_usage($what='')
|
||||
echo ' --webserver-url '.lang('eg. /egroupware or http://domain.com/egroupware, default: %1',str_replace('/setup/setup-cli.php','',$_SERVER['PHP_SELF']))."\n";
|
||||
echo ' --mailserver '.lang('host,{imap | imaps },[domain],[{standard(default)|vmailmgr = add domain for mailserver login}]')."\n";
|
||||
echo ' --smtpserver '.lang('host,[smtp port],[smtp user],[smtp password]')."\n";
|
||||
echo ' --postfix '.lang('Postfix with LDAP: [yes(user edit forwarding)]')."\n";
|
||||
echo ' --cyrus '.lang('Cyrus IMAP: Admin user,Password')."\n";
|
||||
echo ' --smtp '.lang('MTA (with LDAP): [yes(user edit forwarding)],(defaultsmtp|postfix(ldap|dbmailuser)|emailadmin_smtp_(ldap|ads|mandriva|suse|sql))')."\n";
|
||||
echo ' --imap '.lang('IMAP: Admin user,Password,(defaultimap|cyrusimap|emailadmin_dovecot)')."\n";
|
||||
echo ' --sieve '.lang('Sieve: Host[,Port(4190)]')."\n";
|
||||
echo ' --account-auth '.lang('account repository{sql(default) | ldap},[authentication{sql | ldap | mail | ads | http | ...}],[sql encrypttion{md5 | blowfish_crypt | md5_crypt | crypt}],[check save password{ (default)|True}],[allow cookie auth{ (default)|True}]')."\n";
|
||||
echo ' --account-auth '.lang('account repository{sql(default) | ldap | ads},[authentication{sql | ldap | ads | mail | http | ...}],[sql encrypttion{md5 | blowfish_crypt | md5_crypt | crypt}],[check save password{ (default)|True}],[allow cookie auth{ (default)|True}]')."\n";
|
||||
echo ' --ldap-host --ldap-root-dn --ldap-root-pw --ldap-context --ldap-group-context'."\n";
|
||||
echo ' --ads-host --ads-domain --ads-admin-user --ads-admin-pw --ads-connection (ssl|tls) --ads-context'."\n";
|
||||
}
|
||||
if (!$what)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user