Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54877 - in /trunk/mail/src: MailServer.ycp YaPI/MailServer.pm mail-server_dialogs.ycp
  • From: varkoly@xxxxxxxxxxxxxxxx
  • Date: Thu, 22 Jan 2009 09:03:58 -0000
  • Message-id: <E1LPvTi-00072J-Nz@xxxxxxxxxxxxxxxx>
Author: varkoly
Date: Thu Jan 22 10:03:58 2009
New Revision: 54877

URL: http://svn.opensuse.org/viewcvs/yast?rev=54877&view=rev
Log:
wait 10 sec after starting cyrus
fix default count for VSCount
create mailbox for root

Modified:
trunk/mail/src/MailServer.ycp
trunk/mail/src/YaPI/MailServer.pm
trunk/mail/src/mail-server_dialogs.ycp

Modified: trunk/mail/src/MailServer.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/MailServer.ycp?rev=54877&r1=54876&r2=54877&view=diff
==============================================================================
--- trunk/mail/src/MailServer.ycp (original)
+++ trunk/mail/src/MailServer.ycp Thu Jan 22 10:03:58 2009
@@ -591,11 +591,8 @@
}
string crypted = Users::CryptPassword(AdminPassword, "system", "foo");
SCR::Write(.target.passwd.cyrus, crypted);
-
- if(Service::Status("cyrus") > 0) {
- Service::Start("cyrus");
- Service::Enable("cyrus");
- }
+ y2milestone("--- Enabling cyrus --");
+ Service::Enable("cyrus");
} else {
if(cyrus_installed) {
Service::Stop("cyrus");
@@ -609,7 +606,12 @@
Report::Warning(_("Cannot write the mail server local delivery
settings."));
}
if(MailLocalDelivery["Type"]:"none" == "cyrus") {
- Service::Reload("cyrus");
+ y2milestone("--- Stop cyrus --");
+ Service::Stop("cyrus");
+ y2milestone("--- Start cyrus --");
+ Service::Start("cyrus");
+ sleep(10000);
+ YaPI::MailServer::CreateRootMailbox(AdminPassword);
}
}
sleep(sl);

Modified: trunk/mail/src/YaPI/MailServer.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54877&r1=54876&r2=54877&view=diff
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Thu Jan 22 10:03:58 2009
@@ -2104,20 +2104,6 @@
SCR->Execute('.mail.cyrusconf.toggleService', 'pop3s');
}
}
- #Create mailbox for root
- my $imap = new Net::IMAP($imaphost, Debug => 0);
- if( $imap )
- {
- my $ret = $imap->login($imapadm, $AdminPassword);
- if($$ret{Status} eq "ok")
- {
- $ret = $imap->create('user/root');
- $ret = $imap->setacl('user/root', 'cyrus', "lrswipkxtea");
- $ret = $imap->setacl('user/root', 'root', "lrswipkxtea");
- $ret = $imap->setacl('user/root', 'anyone', "" );
- }
- $imap->logout();
- }
}
elsif( $MailLocalDelivery->{'Type'} eq 'none')
{
@@ -2139,6 +2125,31 @@
return 1;
}

+BEGIN { $TYPEINFO{CreateRootMailbox} =["function", "any", "string"]; }
+sub CreateRootMailbox {
+ my $self = shift;
+ my $AdminPassword = shift;
+
+ #Create mailbox for root
+ my $imap = new Net::IMAP($imaphost, Debug => 0);
+ if( $imap )
+ {
+ my $ret = $imap->login($imapadm, $AdminPassword);
+ if($$ret{Status} eq "ok")
+ {
+ $ret = $imap->select('usr/root');
+ if( $ret->{Status} ne 'ok' )
+ {
+ $ret = $imap->create('user/root');
+ $ret = $imap->setacl('user/root', 'cyrus', "lrswipkxtea");
+ $ret = $imap->setacl('user/root', 'root', "lrswipkxtea");
+ $ret = $imap->setacl('user/root', 'anyone', "" );
+ }
+ }
+ $imap->logout();
+ }
+}
+
BEGIN { $TYPEINFO{ReadFetchingMail} =["function", "any", "string"]; }
sub ReadFetchingMail {
my $self = shift;

Modified: trunk/mail/src/mail-server_dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_dialogs.ycp?rev=54877&r1=54876&r2=54877&view=diff
==============================================================================
--- trunk/mail/src/mail-server_dialogs.ycp (original)
+++ trunk/mail/src/mail-server_dialogs.ycp Thu Jan 22 10:03:58 2009
@@ -666,7 +666,7 @@
list<map<string,string> > AccessList = (list<map<string,string> >)
MailServer::MailPrevention["AccessList"]:[];
boolean VirusScanning =
(boolean)MailServer::MailPrevention["VirusScanning"]:false;
boolean SpamLearning =
(boolean)MailServer::MailPrevention["SpamLearning"]:false;
- integer VSCount =
(integer)MailServer::MailPrevention["VSCount"]:10;
+ integer VSCount = (integer)MailServer::MailPrevention["VSCount"]:5;
boolean BasicProtectionOff = false;
boolean BasicProtectionMedium = false;
boolean BasicProtectionHard = true;
@@ -1430,7 +1430,7 @@
if( ret == `SpamLearning ) {
MailServer::MailPrevention["Changed"] = true;
UI::ChangeWidget(`id(`VirusScanning), `Value, true);
- UI::ChangeWidget(`id(`VSCount), `Value, 10);
+ UI::ChangeWidget(`id(`VSCount), `Value,
MailServer::MailPrevention["VSCount"]:"5");
continue;
}
if(ret == `RBLAdd) {

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

< Previous Next >
This Thread
  • No further messages