Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47375 - in /trunk/mail/src: MailServer.ycp MailServerLDAP.pm YaPI/MailServer.pm mail-server_dialogs.ycp mail-server_ldap-setup.ycp ui.ycp
  • From: varkoly@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 May 2008 10:39:53 -0000
  • Message-id: <20080508103953.5857F2DD2C@xxxxxxxxxxxxxxxx>
Author: varkoly
Date: Thu May 8 12:39:52 2008
New Revision: 47375

URL: http://svn.opensuse.org/viewcvs/yast?rev=47375&view=rev
Log:
meging changes in 10.3

Modified:
trunk/mail/src/MailServer.ycp
trunk/mail/src/MailServerLDAP.pm
trunk/mail/src/YaPI/MailServer.pm
trunk/mail/src/mail-server_dialogs.ycp
trunk/mail/src/mail-server_ldap-setup.ycp
trunk/mail/src/ui.ycp

Modified: trunk/mail/src/MailServer.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/MailServer.ycp?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/MailServer.ycp (original)
+++ trunk/mail/src/MailServer.ycp Thu May 8 12:39:52 2008
@@ -137,7 +137,7 @@
/**
* Some additional parameter needed for the configuration.
*/
-global string AdminPassword = "";
+global string AdminPassword = nil;

/**
* List of the Configuration Modules
@@ -303,6 +303,13 @@
l_to_install = add( l_to_install, "yast2-mail-plugins" );
to_install = to_install + "yast2-mail-plugins\n";
}
+ if(!amavis_installed)
+ {
+ l_to_install = add( l_to_install, "amavisd-new" );
+ to_install = to_install + "amavisd-new\n";
+ l_to_install = add( l_to_install, "clamav" );
+ to_install = to_install + "clamav\n";
+ }
if(to_install != "")
{
if ( Report::AnyQuestion ("",_("You have not installed all needed
packages.") +

Modified: trunk/mail/src/MailServerLDAP.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/MailServerLDAP.pm?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/MailServerLDAP.pm (original)
+++ trunk/mail/src/MailServerLDAP.pm Thu May 8 12:39:52 2008
@@ -30,7 +30,6 @@

our %TYPEINFO;

-YaST::YCP::Import ("Ldap");
YaST::YCP::Import ("YaPI::LdapServer");
YaST::YCP::Import ("Service");

@@ -54,48 +53,48 @@
{
push @{$schemas},'/etc/openldap/schema/suse-mailserver.schema';
YaPI::LdapServer->WriteSchemaIncludeList($schemas);
- my $indices =
YaPI::LdapServer->ReadIndex($ldapMap->{ldap_domain});
- my $SuSEMailClient = 0;
- my $SuSEMailDomainMasquerading = 0;
- my $suseTLSPerSitePeer= 0;
- foreach my $index (@{$indices})
- {
- if( $index->{attr} eq
"SuSEMailClient,SUSEMailAcceptAddress,zoneName")
- {
- $SuSEMailClient = 1;
- }
- if( $index->{attr} eq
"SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType")
- {
- $SuSEMailDomainMasquerading = 1;
- }
- if( $index->{attr} eq
"suseTLSPerSitePeer,SuSEMailTransportDestination")
- {
- $suseTLSPerSitePeer = 1;
- }
- }
- if(!$SuSEMailClient)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" =>
"SuSEMailClient,SUSEMailAcceptAddress,zoneName",
- "param" => "eq" }
- );
- }
- if(!$SuSEMailDomainMasquerading)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" =>
"SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType",
- "param" => "eq" }
- );
- }
- if(!$suseTLSPerSitePeer)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" =>
"suseTLSPerSitePeer,SuSEMailTransportDestination",
- "param" => "eq" }
- );
- }
- YaPI::LdapServer->RecreateIndex($ldapMap->{ldap_domain});
}
+ my $indices = YaPI::LdapServer->ReadIndex($ldapMap->{ldap_domain});
+ my $SuSEMailClient = 0;
+ my $SuSEMailDomainMasquerading = 0;
+ my $suseTLSPerSitePeer= 0;
+ foreach my $index (@{$indices})
+ {
+ if( $index->{attr} eq
"SuSEMailClient,SUSEMailAcceptAddress,zoneName")
+ {
+ $SuSEMailClient = 1;
+ }
+ if( $index->{attr} eq
"SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType")
+ {
+ $SuSEMailDomainMasquerading = 1;
+ }
+ if( $index->{attr} eq
"suseTLSPerSitePeer,SuSEMailTransportDestination")
+ {
+ $suseTLSPerSitePeer = 1;
+ }
+ }
+ if(!$SuSEMailClient)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" =>
"SuSEMailClient,SUSEMailAcceptAddress,zoneName",
+ "param" => "eq" }
+ );
+ }
+ if(!$SuSEMailDomainMasquerading)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" =>
"SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType",
+ "param" => "eq" }
+ );
+ }
+ if(!$suseTLSPerSitePeer)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" =>
"suseTLSPerSitePeer,SuSEMailTransportDestination",
+ "param" => "eq" }
+ );
+ }
+ YaPI::LdapServer->RecreateIndex($ldapMap->{ldap_domain});
Service->Restart("ldap");
}
}

Modified: trunk/mail/src/YaPI/MailServer.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Thu May 8 12:39:52 2008
@@ -2605,12 +2605,11 @@

=item *

-C<boolean = ResetMailServer($AdminPassword,$LDAPMap)>
+C<boolean = ResetMailServer($AdminPassword)>

Funktion to reset the mail server configuration:
Needed Parameters are:
$AdminPassword the Adminstrator Psssword
- $LDAPMap the LDAP map returned by ReadLDAPDefaults

Sets Maximum Mail Size to 10MB
Sets Sending Mail Type to DNS
@@ -2623,11 +2622,11 @@
masquerade_exceptions

=cut
-BEGIN { $TYPEINFO{ResetMailServer} = ["function", "boolean" ,"string",
["map", "string","any"]]; }
+BEGIN { $TYPEINFO{ResetMailServer} = ["function", "boolean" ,"string"]; }
sub ResetMailServer {
my $self = shift;
my $AdminPassword = shift;
- my $ldapMap = shift;
+ my $ldapMap = $self->ReadLDAPDefaults($AdminPassword);
my $check_postfix = 'if [ -z "$(id postfix | grep -E \'groups=.*mail\')"
]; then
usermod -G mail postfix
fi';

Modified: trunk/mail/src/mail-server_dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_dialogs.ycp?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/mail-server_dialogs.ycp (original)
+++ trunk/mail/src/mail-server_dialogs.ycp Thu May 8 12:39:52 2008
@@ -34,8 +34,9 @@
{
y2milestone("--Start CheckLDAPDialog ---");
boolean ca_mgm = false;
- boolean conf_ldap_server = false;
+ boolean conf_ldap_client = false;
boolean setup_ldap_server = false;
+ boolean ldap_server_local = false;
string comment = "";
Ldap::Read();
Ldap::LDAPInit();
@@ -46,27 +47,29 @@
{ //No LDAP-Client configuration
setup_ldap_server = true;
ca_mgm = true;
- conf_ldap_server = true;
- comment = _("Your computer is not configured as an LDAP client.") +
"<br>" +
- _("We suggest to set up a local LDAP server for the mail
server.") + "<br>" +
- _("Create certificates for the LDAP and mail server in order
to secure your system.") + "<br>";
+ conf_ldap_client = true;
+ ldap_server_local = true;
+ comment = _("Your computer is not configured as an LDAP client.") +
"<br>" +
+ _("We suggest to set up a local LDAP server for the mail
server.") + "<br>" +
+ _("Create certificates for the LDAP and mail server in order
to secure your system.") + "<br>";
}
else
{ //The computer is configured as LDAP-Client
if( LDAPSettings["ldap_server"]:"" == "127.0.0.1" )
{ // The LDAP-Server is local
- comment = _("Your computer is configured as an LDAP client and the
LDAP server is local.") + "<br>" +
- _("We suggest to adapt the LDAP server configuration for the
mail server.") + "<br>" +
- _("For this reason you have to know the password of the LDAP
administrator account:") + "<br>" +
+ comment = _("Your computer is configured as an LDAP client and the
LDAP server is local.") + "<br>" +
+ _("We suggest to adapt the LDAP server configuration for the
mail server.") + "<br>" +
+ _("For this reason you have to know the password of the LDAP
administrator account:") + "<br>" +
"<B>" + LDAPSettings["bind_dn"]:"" + ".</B><BR>";
+ ldap_server_local = true;
}
else
{ // The LDAP-Server is not local
- comment = _("Your computer is configured as LDAP client and the
LDAP server is not local.") + "<br>" +
- _("We suggest to configure the LDAP server for the mail
server.") + "<br>" +
- _("For this reason you have to know the password of the LDAP
administrator account:") + "<br>" +
- "<B>" + LDAPSettings["bind_dn"]:"" + ".</B><BR>" +
- _("Furthermore, the LDAP server has to contain the
<b>suse-mailserver.schema</b> and the corresponding index entries.");
+ comment = _("Your computer is configured as LDAP client and the
LDAP server is not local.") + "<br>" +
+ _("We suggest to configure the LDAP server for the mail
server.") + "<br>" +
+ _("For this reason you have to know the password of the
LDAP administrator account:") + "<br>" +
+ "<B>" + LDAPSettings["bind_dn"]:"" + ".</B><BR>" +
+ _("Furthermore, the LDAP server has to contain the
<b>suse-mailserver.schema</b> and the corresponding index entries.");
}
}

@@ -77,11 +80,11 @@
`VSpacing(0.2),
`RichText(comment),
`VSpacing(0.2),
- `Left(`CheckBox(`id(`setup_ldap_server),_("Set up a local LDAP
server."), setup_ldap_server)),
- `VSpacing(0.2),
`Left(`CheckBox(`id(`ca_mgm), _("Create
certificates."), ca_mgm)),
`VSpacing(0.2),
- `Left(`CheckBox(`id(`conf_ldap_server), _("Configure dedicated
LDAP server."), conf_ldap_server)),
+ `Left(`CheckBox(`id(`setup_ldap_server),_("Set up a local LDAP
server."), setup_ldap_server)),
+ `VSpacing(0.2),
+ `Left(`CheckBox(`id(`conf_ldap_client), _("Configure dedicated
LDAP server."), conf_ldap_client)),
`HBox (
`PushButton (`id (`abort),Label::AbortButton()),
`PushButton (`id (`next),Label::NextButton())
@@ -92,7 +95,7 @@
any ui = UI::UserInput ();
setup_ldap_server =
(boolean)UI::QueryWidget(`id(`setup_ldap_server),`Value);
ca_mgm = (boolean)UI::QueryWidget(`id(`ca_mgm),`Value);
- conf_ldap_server =
(boolean)UI::QueryWidget(`id(`conf_ldap_server),`Value);
+ conf_ldap_client =
(boolean)UI::QueryWidget(`id(`conf_ldap_client),`Value);
UI::CloseDialog();
if( ui == `abort )
{
@@ -108,13 +111,22 @@
{ // Now we setup the LDAP Server
args = add(args, "setup");
}
- if( setup_ldap_server || ca_mgm || conf_ldap_server )
+ if( conf_ldap_client )
+ { // Now we setup the server as LDAP Server
+ args = add(args, "conf");
+ }
+ if( ldap_server_local )
+ { // The LDAP server is local we can configure the schemas
+ args = add(args, "local");
+ }
+ Progress::NextStage();
+ if( setup_ldap_server || ca_mgm || conf_ldap_client || ldap_server_local )
{
WFM::CallFunction("mail-server_ldap-setup",args);
Ldap::Read();
Ldap::LDAPInit();
+ LDAPSettings = (map <string, any>) Ldap::Export();
}
- Progress::NextStage();
MailServer::AdminPassword = Ldap::LDAPAskAndBind(false);
if( MailServer::AdminPassword != nil )
{
@@ -133,7 +145,7 @@
//write the settings:
Ldap::Write(abort);
//create default mail-server configuration
-
YaPI::MailServer::ResetMailServer(MailServer::AdminPassword,LDAPSettings);
+ YaPI::MailServer::ResetMailServer(MailServer::AdminPassword);
return `ok;
}
else
@@ -165,7 +177,6 @@
{
return `abort;
}
- Ldap::Read();
}
Ldap::LDAPInit();

@@ -180,7 +191,10 @@
MailServer::CertExist = true;
}

- MailServer::AdminPassword = Ldap::LDAPAskAndBind(false);
+ if( MailServer::AdminPassword == nil )
+ {
+ MailServer::AdminPassword = Ldap::LDAPAskAndBind(false);
+ }
if( MailServer::AdminPassword == nil )
{
return `abort;

Modified: trunk/mail/src/mail-server_ldap-setup.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_ldap-setup.ycp?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/mail-server_ldap-setup.ycp (original)
+++ trunk/mail/src/mail-server_ldap-setup.ycp Thu May 8 12:39:52 2008
@@ -18,12 +18,10 @@

{
textdomain "mail";
-import "Ldap";
+import "Label";
import "MailServerLDAP";
-import "YaPI::MailServer";
import "Package";
import "Report";
-import "Label";

string ERROR = "";
list args = WFM::Args();
@@ -38,6 +36,11 @@
l_to_install = add( l_to_install, "yast2-ldap-server" );
to_install = to_install + "yast2-ldap-server\n";
}
+ if( contains(args,"setup") && !Package::Installed ( "openldap2" ) )
+ {
+ l_to_install = add( l_to_install, "openldap2" );
+ to_install = to_install + "openldap2\n";
+ }
if( contains(args,"setup") && !Package::Installed ( "bind-utils" ) )
{
l_to_install = add( l_to_install, "bind-utils" );
@@ -75,11 +78,14 @@
if(contains(args,"setup") )
{
WFM::CallFunction("ldap-server",[]);
- MailServerLDAP::ConfigureLDAPServer();
}
- if(contains(args,"setup") )
+ if(contains(args,"conf") )
+ {
+ WFM::CallFunction("ldap",[]);
+ }
+ if(contains(args,"local"))
{
- WFM::CallFunction("ldap",[]);
+ MailServerLDAP::ConfigureLDAPServer();
}
return true;
}

Modified: trunk/mail/src/ui.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/ui.ycp?rev=47375&r1=47374&r2=47375&view=diff
==============================================================================
--- trunk/mail/src/ui.ycp (original)
+++ trunk/mail/src/ui.ycp Thu May 8 12:39:52 2008
@@ -1000,7 +1000,7 @@
}

// validity checks: reuse fetchmail widgets
- if (Validate_fm_server (`server) &&
+ if (Validate_outgoing_mail_server (`server) &&
Validate_fm_remote_user (`user))
{
break;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages