commit yast2-mail for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-mail for openSUSE:Factory checked in at Thu Jan 22 13:19:28 CET 2009. -------- --- yast2-mail/yast2-mail.changes 2009-01-19 16:50:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-mail/yast2-mail.changes 2009-01-22 10:14:32.634813000 +0100 @@ -1,0 +2,6 @@ +Thu Jan 22 10:12:09 CET 2009 - varkoly@suse.de + +- bnc#467589 - Cyrus don't create Directory for new LDAP User at first run. +- bnc#467562 - Yast mail doesn't install needed Spamassassin Package for SPAM learning extension for Mailserver + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-mail.spec ++++++ --- /var/tmp/diff_new_pack.O23369/_old 2009-01-22 13:18:59.000000000 +0100 +++ /var/tmp/diff_new_pack.O23369/_new 2009-01-22 13:18:59.000000000 +0100 @@ -20,7 +20,7 @@ Name: yast2-mail Version: 2.17.4 -Release: 3 +Release: 5 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -170,7 +170,11 @@ /usr/share/YaST2/modules/UsersPluginMail.pm %dir /usr/share/YaST2/clients /usr/share/YaST2/clients/users* + %changelog +* Thu Jan 22 2009 varkoly@suse.de +- bnc#467589 - Cyrus don't create Directory for new LDAP User at first run. +- bnc#467562 - Yast mail doesn't install needed Spamassassin Package for SPAM learning extension for Mailserver * Mon Jan 19 2009 varkoly@suse.de - bnc#466748 - yast2-mail-plugins broken * Thu Jan 08 2009 varkoly@suse.de ++++++ yast2-mail-2.17.4.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-mail-2.17.4/src/mail-server_dialogs.ycp new/yast2-mail-2.17.4/src/mail-server_dialogs.ycp --- old/yast2-mail-2.17.4/src/mail-server_dialogs.ycp 2009-01-06 09:25:19.000000000 +0100 +++ new/yast2-mail-2.17.4/src/mail-server_dialogs.ycp 2009-01-22 10:04:32.000000000 +0100 @@ -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) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-mail-2.17.4/src/MailServer.ycp new/yast2-mail-2.17.4/src/MailServer.ycp --- old/yast2-mail-2.17.4/src/MailServer.ycp 2009-01-06 09:35:45.000000000 +0100 +++ new/yast2-mail-2.17.4/src/MailServer.ycp 2009-01-22 10:04:32.000000000 +0100 @@ -162,7 +162,6 @@ global boolean pam_ldap_installed = false; global boolean nss_ldap_installed = false; global boolean procmail_installed = false; -global boolean amavis_installed = false; global boolean ldap_installed = false; global boolean cyrus_installed = false; global boolean postfix_installed = false; @@ -170,6 +169,9 @@ global boolean sasl_installed = false; global boolean saslauthd_installed = false; global boolean plugins_installed = false; +global boolean amavis_installed = false; +global boolean spamassassin_installed=false; +global boolean clamav_installed = false; /* * Help funktion to check the DNS Settings @@ -268,10 +270,12 @@ postfix_installed = Installed("postfix"); fetchmail_installed = Installed("fetchmail"); ldap_installed = Installed("yast2-ldap-client"); - amavis_installed = Installed("amavisd-new"); sasl_installed = Installed("cyrus-sasl-plain"); saslauthd_installed = Installed("cyrus-sasl-saslauthd"); plugins_installed = Installed("yast2-mail-plugins"); + amavis_installed = Installed("amavisd-new"); + clamav_installed = Installed("clamav"); + spamassassin_installed= Installed("spamassassin"); string to_install = ""; list<string> l_to_install = []; @@ -310,13 +314,6 @@ 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.") + @@ -504,13 +501,13 @@ /* Progress stage 1/7 */ _("Write mail server global settings"), /* Progress stage 2/7 */ - _("Write mail server transports"), + _("Write mail server local delivery settings"), /* Progress stage 3/7 */ - _("Write mail server prevention settings"), + _("Write mail server transports"), /* Progress stage 4/7 */ - _("Write mail server relaying settings"), + _("Write mail server prevention settings"), /* Progress stage 5/7 */ - _("Write mail server local delivery settings"), + _("Write mail server relaying settings"), /* Progress stage 6/3 */ _("Write mail fetching jobs"), /* Progress stage 7/7 */ @@ -519,13 +516,13 @@ /* Progress stage 1/7 */ _("Writing mail server global settings..."), /* Progress stage 2/7 */ - _("Writing mail server transports..."), + _("Writing mail server local delivery settings..."), /* Progress stage 3/7 */ - _("Writing mail server prevention settings..."), + _("Writing mail server transports..."), /* Progress stage 4/7 */ - _("Writing mail server relaying settings..."), + _("Writing mail server prevention settings..."), /* Progress stage 5/7 */ - _("Writing mail server local delivery settings..."), + _("Writing mail server relaying settings..."), /* Progress stage 6/3 */ _("Writing mail fetching jobs..."), /* Progress stage 7/7 */ @@ -550,66 +547,6 @@ } sleep(sl); - // write mail transports - if(Abort()) return false; - Progress::NextStep(); - if( (boolean)MailTransports["Changed"]:false ) { - // First we have to clean up TLS Sites - if( ! YaPI::MailServer::WriteMailTransports(MailTransports,AdminPassword) ) { - Report::Error(_("Cannot write mail server transports.")); - } - } - sleep(sl); - - // write mail preventions - if(Abort()) return false; - Progress::NextStage(); - if((boolean)MailPrevention["VirusScanning"]:false) { - if(! amavis_installed) - { - if ( Report::AnyQuestion ("",_("You have not installed all needed packages.") + - "\n clamav \n amavisd-new \n", - Label::InstallButton(), - Label::AbortButton(), - `focus_yes)) - { - Package::DoInstall(["clamav","amavisd-new"]); - Service::Start("clamd"); - Service::Start("freshclam"); - Service::Start("amavis"); - y2milestone("Installing amavis"); - } - else - { - return false; - } - } - Service::Enable("amavis"); - Service::Enable("clamd"); - Service::Enable("freshclam"); - } - if( (boolean)MailPrevention["Changed"]:false ) { - if( ! YaPI::MailServer::WriteMailPrevention(MailPrevention,AdminPassword) ) { - Report::Error(_("Cannot write mail server preventions.")); - } - if((boolean)MailPrevention["VirusScanning"]:false) { - Service::Restart("clamd"); - Service::Restart("freshclam"); - Service::Restart("amavis"); - } - } - sleep(sl); - - // write mail realaying - if(Abort()) return false; - Progress::NextStage(); - if( (boolean)MailRelaying["Changed"]:false ) { - if( ! YaPI::MailServer::WriteMailRelaying(MailRelaying,AdminPassword) ) { - Report::Warning(_("Cannot write the mail server relay settings.")); - } - } - sleep(sl); - // write mail local delivery // first we looking for if all the needed packages are installed if(MailLocalDelivery["Type"]:"none" == "procmail"){ @@ -636,38 +573,26 @@ } if(MailLocalDelivery["Type"]:"none" == "cyrus") { - if(!cyrus_installed) - { - if ( Report::AnyQuestion ("",_("You have not installed all needed packages.") + - "\n cyrus-imapd \n", - Label::InstallButton(), - Label::AbortButton(), - `focus_yes)) - { - Package::DoInstall(["cyrus-imapd"]); - SCR::UnmountAgent(.etc.imapd_conf); - } - else - { - return false; - } - } - string crypted = Users::CryptPassword(AdminPassword, "system", "foo"); - SCR::Write(.target.passwd.cyrus, crypted); - - list Values = SCR::Dir(.etc.imapd_conf); - SCR::Write(.etc.imapd_conf.allowplaintext,"yes"); - if(!contains(Values,"unixhierarchysep")) { - SCR::Write(.etc.imapd_conf.unixhierarchysep,"yes"); - } - if(!contains(Values,"allowplainwithouttls")) { - SCR::Write(.etc.imapd_conf.allowplainwithouttls,"yes"); - } - SCR::Write(.etc.imapd_conf,nil); - if(Service::Status("cyrus") > 0) { - Service::Start("cyrus"); - Service::Enable("cyrus"); - } + if(!cyrus_installed) + { + if ( Report::AnyQuestion ("",_("You have not installed all needed packages.") + + "\n cyrus-imapd \n", + Label::InstallButton(), + Label::AbortButton(), + `focus_yes)) + { + Package::DoInstall(["cyrus-imapd"]); + SCR::UnmountAgent(.etc.imapd_conf); + } + else + { + return false; + } + } + string crypted = Users::CryptPassword(AdminPassword, "system", "foo"); + SCR::Write(.target.passwd.cyrus, crypted); + y2milestone("--- Enabling cyrus --"); + Service::Enable("cyrus"); } else { if(cyrus_installed) { Service::Stop("cyrus"); @@ -681,7 +606,102 @@ 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); + + // write mail transports + if(Abort()) return false; + Progress::NextStep(); + if( (boolean)MailTransports["Changed"]:false ) { + // First we have to clean up TLS Sites + if( ! YaPI::MailServer::WriteMailTransports(MailTransports,AdminPassword) ) { + Report::Error(_("Cannot write mail server transports.")); + } + } + sleep(sl); + + // write mail preventions + if(Abort()) return false; + Progress::NextStage(); + if((boolean)MailPrevention["VirusScanning"]:false) + { + string to_install = ""; + list<string> l_to_install = []; + if(!amavis_installed) + { + l_to_install = add( l_to_install, "amavisd-new" ); + to_install = to_install + "\n amavisd-new"; + if(!clamav_installed) + { + l_to_install = add( l_to_install, "clamav" ); + to_install = to_install + "\n clamav"; + } + if(!spamassassin_installed) + { + l_to_install = add( l_to_install, "spamassassin" ); + to_install = to_install + "\n spamassassin"; + } + if(! amavis_installed || !clamav_installed || !spamassassin_installed) + { + if ( Report::AnyQuestion ("",_("You have not installed all needed packages.") + + to_install, + Label::InstallButton(), + Label::AbortButton(), + `focus_yes)) + { + Package::DoInstall(l_to_install); + y2milestone("Installing amavis"); + } + else + { + return false; + } + Service::Start("clamd"); + Service::Start("freshclam"); + Service::Start("amavis"); + } + Service::Enable("amavis"); + Service::Enable("clamd"); + Service::Enable("freshclam"); + } + } + if( (boolean)MailPrevention["Changed"]:false ) { + if( ! YaPI::MailServer::WriteMailPrevention(MailPrevention,AdminPassword) ) { + Report::Error(_("Cannot write mail server preventions.")); + } + if((boolean)MailPrevention["VirusScanning"]:false) { + Service::Enable("amavis"); + Service::Enable("clamd"); + Service::Enable("freshclam"); + Service::Restart("clamd"); + Service::Restart("freshclam"); + Service::Restart("amavis"); + } + else + { + Service::Stop("clamd"); + Service::Stop("freshclam"); + Service::Stop("amavis"); + Service::Disable("amavis"); + Service::Disable("clamd"); + Service::Disable("freshclam"); + } + } + sleep(sl); + + // write mail realaying + if(Abort()) return false; + Progress::NextStage(); + if( (boolean)MailRelaying["Changed"]:false ) { + if( ! YaPI::MailServer::WriteMailRelaying(MailRelaying,AdminPassword) ) { + Report::Warning(_("Cannot write the mail server relay settings.")); } } sleep(sl); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-mail-2.17.4/src/YaPI/MailServer.pm new/yast2-mail-2.17.4/src/YaPI/MailServer.pm --- old/yast2-mail-2.17.4/src/YaPI/MailServer.pm 2009-01-09 16:56:50.000000000 +0100 +++ new/yast2-mail-2.17.4/src/YaPI/MailServer.pm 2009-01-22 10:11:44.000000000 +0100 @@ -1212,6 +1212,7 @@ $MailPrevention{'SpamLearning'} = YaST::YCP::Boolean(1); } } + $imap->logout(); } return \%MailPrevention; @@ -1509,13 +1510,13 @@ setfacl -m u:vscan:rx /var/spool/imap /var/spool/imap/{NoSpam,NewSpam} setfacl -m m::rx /var/spool/imap /var/spool/imap/{NoSpam,NewSpam} -su - vscan -c "/usr/bin/sa-learn --sync" +/usr/bin/sa-learn --sync --dbpath /var/spool/amavis/.spamassassin/ ( for i in `ls /var/spool/imap/NewSpam/[0-9]* 2> /dev/null` do setfacl -m user:vscan:r-x $i echo $i - su - vscan -c "/usr/bin/sa-learn --spam $i" + /usr/bin/sa-learn --spam --dbpath /var/spool/amavis/.spamassassin/ $i rm $i done ) >> $LOG 2>&1 @@ -1526,22 +1527,26 @@ do setfacl -m user:vscan:r-x $i echo $i - su - vscan -c "/usr/bin/sa-learn --ham $i" + /usr/bin/sa-learn --ham --dbpath /var/spool/amavis/.spamassassin/ $i rm $i done ) >> $LOG 2>&1 su - cyrus -c "reconstruct NoSpam" &>/dev/null +chown -R vscan /var/spool/amavis/.spamassassin/ setfacl -b /var/spool/imap /var/spool/imap/{NoSpam,NewSpam} '; SCR->Write(".target.string","/etc/cron.hourly/lern-spam",$lernspam); - SCR->Write(".target.bash","chmod 755 /etc/cron.hourly/lern-spam"); + SCR->Execute(".target.bash","chmod 755 /etc/cron.hourly/lern-spam"); } + $imap->logout(); } else { - SCR->Write(".target.bash","test -e /etc/cron.hourly/lern-spam && rm /etc/cron.hourly/lern-spam"); - $ret = $imap->delete('NewSpam'); + SCR->Execute(".target.bash","test -e /etc/cron.hourly/lern-spam && rm /etc/cron.hourly/lern-spam"); + $ret = $imap->delete('NewSpam'); + $ret = $imap->delete('NoSpam'); + $imap->logout(); } } return 1; @@ -2012,6 +2017,9 @@ SCR->Write('.etc.imapd_conf.quotawarn',$MailLocalDelivery->{'QuotaLimit'}); SCR->Write('.etc.imapd_conf.timeout',$MailLocalDelivery->{'ImapIdleTime'}); SCR->Write('.etc.imapd_conf.poptimeout',$MailLocalDelivery->{'PopIdleTime'}); + SCR->Write('.etc.imapd_conf.allowplaintext','yes'); + SCR->Write('.etc.imapd_conf.unixhierarchysep','yes'); + SCR->Write('.etc.imapd_conf.allowplainwithouttls','yes'); if($MailLocalDelivery->{'FallBackMailbox'} ne '' ) { SCR->Write('.etc.imapd_conf.lmtp_luser_relay',$MailLocalDelivery->{'FallBackMailbox'}); @@ -2117,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; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de