allow to set smtp auth options via setup-cli

This commit is contained in:
Ralf Becker 2013-07-15 15:27:47 +00:00
parent e51784ba30
commit 393d35657d
2 changed files with 5 additions and 4 deletions

View File

@ -173,8 +173,9 @@ class setup_cmd_config extends setup_cmd
array('name' => 'editforwardingaddress','allowed' => array('yes',null)),
array('name' => 'smtpType','default' => 'postfixldap'),
),
'--smtpserver' => array( //smtp server,[smtp port],[smtp user],[smtp password]
'smtp_server',array('name' => 'smtp_port','default' => 25),'smtp_auth_user','smtp_auth_passwd',''
'--smtpserver' => array( //smtp server,[smtp port],[smtp user],[smtp password],[auth=no|yes|ann]
'smtp_server',array('name' => 'smtp_port','default' => 25),'smtp_auth_user','smtp_auth_passwd',
array('name' => 'smtpAuth', 'default' => 'no', 'allowed' => array('no', 'yes', 'ann')),
),
'--account-auth' => array(
array('name' => 'account_repository','allowed' => array('sql','ldap'),'default'=>'sql'),
@ -299,7 +300,7 @@ class setup_cmd_config extends setup_cmd
{
$config[$row['config_name']] = $row['config_value'];
}
$config['smtpAuth'] = $config['smtp_auth_user'] ? 'yes' : null;
if (!$config['smtpAuth']) $config['smtpAuth'] = $config['smtp_auth_user'] ? 'yes' : null;
$emailadmin = new emailadmin_bo(false,false); // false=no session stuff
$emailadmin->setDefaultProfile($config);

View File

@ -497,7 +497,7 @@ function do_usage($what='')
echo ' --files-dir, --backup-dir, --temp-dir '.lang('path to various directories: have to exist and be writeable by the webserver')."\n";
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 | pop3 | imaps | pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}]')."\n";
echo ' --smtpserver '.lang('host,[smtp port],[smtp user],[smtp password]')."\n";
echo ' --smtpserver '.lang('host,[smtp port],[smtp user],[smtp password],[auth=no|yes|ann]')."\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(2000)]')."\n";