Hello community, here is the log from the commit of package yast2-mail for openSUSE:Factory checked in at 2013-06-05 13:25:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-mail (Old) and /work/SRC/openSUSE:Factory/.yast2-mail.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-mail" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-mail/yast2-mail.changes 2013-01-31 14:56:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-mail.new/yast2-mail.changes 2013-06-05 13:25:53.000000000 +0200 @@ -1,0 +2,12 @@ +Sun Apr 21 08:03:06 UTC 2013 - [email protected] + +- bnc#800788 - ag_postfix_mastercf process hangs the system, + after which it is killed by kernel, when saving + mail server settings with Yast "Mail Server" module +- Mark permissions files as %config +- The ldap tables was not proper. All functions for forwarding + and delivery must be placed in alias_maps and not in + virtual_alias_map. Forwarding or delivering actions in virtual_alias_map + may cause mail loops. + +------------------------------------------------------------------- Old: ---- yast2-mail-2.21.1.tar.bz2 New: ---- yast2-mail-2.21.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-mail.spec ++++++ --- /var/tmp/diff_new_pack.WI7Gj8/_old 2013-06-05 13:25:54.000000000 +0200 +++ /var/tmp/diff_new_pack.WI7Gj8/_new 2013-06-05 13:25:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-mail -Version: 2.21.1 +Version: 2.21.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -76,6 +76,7 @@ %prep %setup -n yast2-mail-%{version} +cp agents/MasterCFParser.pm src %build %{_prefix}/bin/y2tool y2autoconf @@ -137,7 +138,6 @@ /usr/share/YaST2/scrconf/mail_cyrusconf.scr /usr/share/YaST2/scrconf/mail_ldaptable.scr /usr/share/YaST2/scrconf/mail_maincf.scr -/usr/share/YaST2/scrconf/mail_mastercf.scr /usr/share/YaST2/scrconf/mail_saslpasswd.scr %dir /usr/lib/YaST2/servers_non_y2 /usr/lib/YaST2/servers_non_y2/ag_cyrus_conf @@ -145,7 +145,6 @@ /usr/lib/YaST2/servers_non_y2/ag_mailconfig /usr/lib/YaST2/servers_non_y2/ag_mail_ldaptable /usr/lib/YaST2/servers_non_y2/ag_mailtable -/usr/lib/YaST2/servers_non_y2/ag_postfix_mastercf /usr/lib/YaST2/servers_non_y2/ag_smtp_auth /usr/lib/YaST2/servers_non_y2/CyrusConfParser.pm /usr/lib/YaST2/servers_non_y2/MasterCFParser.pm @@ -154,7 +153,7 @@ %dir /etc/openldap/ %dir /etc/openldap/schema/ /etc/openldap/schema/suse-mailserver.schema -/etc/permissions.d/mail-server* +%config /etc/permissions.d/mail-server* %doc %{_prefix}/share/doc/packages/yast2-mail #%files aliases ++++++ yast2-mail-2.21.1.tar.bz2 -> yast2-mail-2.21.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/Makefile.am new/yast2-mail-2.21.2/Makefile.am --- old/yast2-mail-2.21.1/Makefile.am 2013-01-30 12:11:13.000000000 +0100 +++ new/yast2-mail-2.21.2/Makefile.am 2013-05-28 15:25:54.000000000 +0200 @@ -158,19 +158,14 @@ TAGVERSION = $(Y2TOOL) tagversion -check-up-to-date check-cvs-up-to-date check-svn-up-to-date: - if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && ! cvs -q -n up 2>/dev/null | grep '^[MCAR] ';\ - else \ - cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' ;\ +# check if there is no modified files and all commits were pushed +check-up-to-date: + if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \ + (echo "ERROR: Source is not commited and pushed. See `git status`"; false) \ fi check-tagversion: - @if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && cvs status -v VERSION | grep -w `$(TAGVERSION) -n` ;\ - else \ - cd $(srcdir) && svn cat `$(TAGVERSION) --echourl`/VERSION; \ - fi >/dev/null; \ + cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \ [ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false ) check-parse-old: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/Makefile.am.common new/yast2-mail-2.21.2/Makefile.am.common --- old/yast2-mail-2.21.1/Makefile.am.common 2013-01-30 12:11:13.000000000 +0100 +++ new/yast2-mail-2.21.2/Makefile.am.common 2013-05-28 15:25:54.000000000 +0200 @@ -31,7 +31,7 @@ CHECK_SYNTAX = true check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/Makefile.in new/yast2-mail-2.21.2/Makefile.in --- old/yast2-mail-2.21.1/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -982,19 +982,14 @@ package: check-up-to-date check-tagversion check-textdomain package-local -check-up-to-date check-cvs-up-to-date check-svn-up-to-date: - if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && ! cvs -q -n up 2>/dev/null | grep '^[MCAR] ';\ - else \ - cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' ;\ +# check if there is no modified files and all commits were pushed +check-up-to-date: + if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \ + (echo "ERROR: Source is not commited and pushed. See `git status`"; false) \ fi check-tagversion: - @if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && cvs status -v VERSION | grep -w `$(TAGVERSION) -n` ;\ - else \ - cd $(srcdir) && svn cat `$(TAGVERSION) --echourl`/VERSION; \ - fi >/dev/null; \ + cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \ [ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false ) check-parse-old: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/VERSION new/yast2-mail-2.21.2/VERSION --- old/yast2-mail-2.21.1/VERSION 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/VERSION 2013-05-16 12:31:35.000000000 +0200 @@ -1 +1 @@ -2.21.1 +2.21.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/Makefile.am new/yast2-mail-2.21.2/agents/Makefile.am --- old/yast2-mail-2.21.1/agents/Makefile.am 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/agents/Makefile.am 2013-05-16 12:31:35.000000000 +0200 @@ -9,7 +9,6 @@ ag_mailtable \ setup_dkim_verifying.pl \ ag_mailconfig \ - ag_postfix_mastercf \ MasterCFParser.pm \ ag_mail_ldaptable \ ag_cyrus_conf \ @@ -31,7 +30,6 @@ \ mail_maincf.scr \ mail_saslpasswd.scr \ - mail_mastercf.scr \ etc_imapd_conf.scr \ mail_ldaptable.scr \ mail_cyrusconf.scr \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/Makefile.in new/yast2-mail-2.21.2/agents/Makefile.in --- old/yast2-mail-2.21.1/agents/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/agents/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -234,7 +234,6 @@ ag_mailtable \ setup_dkim_verifying.pl \ ag_mailconfig \ - ag_postfix_mastercf \ MasterCFParser.pm \ ag_mail_ldaptable \ ag_cyrus_conf \ @@ -256,7 +255,6 @@ \ mail_maincf.scr \ mail_saslpasswd.scr \ - mail_mastercf.scr \ etc_imapd_conf.scr \ mail_ldaptable.scr \ mail_cyrusconf.scr \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/MasterCFParser.pm new/yast2-mail-2.21.2/agents/MasterCFParser.pm --- old/yast2-mail-2.21.1/agents/MasterCFParser.pm 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/agents/MasterCFParser.pm 2013-05-16 12:31:35.000000000 +0200 @@ -80,26 +80,18 @@ =item * C<new();> -Instantiating a MasterCFParser instance. Optional parameter can be a different -path to master.cf and a reference to a logging function. - +Instantiating a MasterCFParser instance. EXAMPLE: - $_CFINST = new MasterCFParser( $config->{"path"}, \&y2error ); + $_CFINST = new MasterCFParser( ); =cut sub new { my $this = shift; - my $path = shift || "/etc/postfix"; - my $logref = shift; - - if( defined $logref && $logref ne "" ) { - *logger = $logref; - } my $class = ref($this) || $this; my $self = {}; - $self->{cffile} = $path."/master.cf"; + $self->{cffile} = "/etc/postfix/master.cf"; bless $self, $class; return $self; @@ -144,7 +136,8 @@ push @$cfa, line2service($line); } } - $this->{MCF} = $cfa; + $this->{MCF} = $cfa; + $this->{SMCF} = scalar(@$cfa); return 0; } @@ -172,7 +165,7 @@ return 1; } - for(my $c=0; $c<scalar(@{$this->{MCF}}); $c++ ) { + for(my $c=0; $c<$this->{SMCF}; $c++ ) { print $fd service2line($this->{MCF}->[$c])."\n"; } @@ -209,7 +202,7 @@ return 1; } - for(my $c=0; $c<scalar(@{$this->{MCF}}); $c++ ) { + for(my $c=0; $c<$this->{SMCF}; $c++ ) { next if ! defined $this->{MCF}->[$c]->{service}; if( $this->{MCF}->[$c]->{service} eq $srv->{service} && $this->{MCF}->[$c]->{command} eq $srv->{command} ) { @@ -299,19 +292,22 @@ push @{$this->{MCF}}, $srv; } else { my $newcf; - for(my $c=0; $c<scalar(@{$this->{MCF}}); $c++ ) { + for(my $c=0; $c<$this->{SMCF}; $c++ ) { if( defined $srv ) { my ($nc, $cmd) = $this->nextCommand($c); if( $cmd eq "pipe" ) { push @$newcf, $srv; - while($c < $nc) { - push @$newcf, $this->{MCF}->[$c++]; - } + while($c < $nc) { + push @$newcf, $this->{MCF}->[$c++]; + } $srv = undef; } } push @$newcf, $this->{MCF}->[$c]; } + if( defined $srv ) { + push @$newcf, $srv; + } $this->{MCF} = $newcf; } return 0; @@ -396,7 +392,7 @@ my $pos = shift; return ($pos, $this->{MCF}->[$pos]->{command}) if defined $this->{MCF}->[$pos]->{command}; - while( ! defined $this->{MCF}->[$pos]->{command} ) { + while( ! defined $this->{MCF}->[$pos]->{command} && $pos < $this->{SMCF} ) { $pos++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/ag_postfix_mastercf new/yast2-mail-2.21.2/agents/ag_postfix_mastercf --- old/yast2-mail-2.21.1/agents/ag_postfix_mastercf 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/agents/ag_postfix_mastercf 1970-01-01 01:00:00.000000000 +0100 @@ -1,98 +0,0 @@ -#! /usr/bin/perl -w - -package ag_postfix_mastercf; -# FIXME: How should that be handled? -use lib qw(/usr/lib/YaST2/servers_non_y2); -use strict; -use MasterCFParser; -use YaST::SCRAgent; -use ycp; -our @ISA = ("YaST::SCRAgent"); - -my $_CFINST = undef; - -sub check_initialized () -{ - my $class = shift; - if (not defined $_CFINST) - { - $class->SetError(summary => "Agent not initialized yet", - code => "SCR_INIT_ERR"); - } - return !!$_CFINST; -} - -sub OtherCommand () { - my $class = shift; - my ($symbol, $config, @rest) = @_; - - if ($symbol ne "MasterCF") { - return $class->SetError(summary=> "The first command must be the configuration.(Seen '$_')", - code => "SCR_INIT_ERR"); - } else { - $_CFINST = new MasterCFParser( $config->{"path"}, \&y2error ); - if( not defined $_CFINST ) { - return $class->SetError(summary => "Can not initialize MasterCFParser", - code => "SCR_INIT_ERR"); - } - if( $_CFINST->readMasterCF() ) { - return $class->SetError(summary => "Can not read master.cf", - code => "SCR_INIT_ERR"); - } - # FIXME: Set logging callback here - } - - return 1; -} - -sub Read { - my $class = shift; - my ($path, @args) = @_; - - if( $_CFINST->readMasterCF() ) { - # FIXME: How about $class->SetError() ??? - return undef; - } - - return 1; -} - -sub Write { - my $class = shift; - my ($path, @args) = @_; - - return undef if ! $class->check_initialized(); - if( $_CFINST->writeMasterCF() ) { - # FIXME: How about $class->SetError() ??? - return undef; - } - - return 1; -} - -sub Execute { - my $class = shift; - my ($path, @args) = @_; - - return undef if ! $class->check_initialized(); - - if( $path eq '.modifyService' ) { - my $service = $args[0]; - return undef if $_CFINST->modifyService( $service ); - } elsif ( $path eq '.findService' ) { - my $service = $args[0]; - return $_CFINST->getServiceByAttributes( $service ); - } elsif ( $path eq '.deleteService' ) { - my $service = $args[0]; - return undef if $_CFINST->deleteService( $service ); - } elsif ( $path eq '.addService' ) { - my $service = $args[0]; - return undef if $_CFINST->addService($service); - } - - return undef; -} - - -package main; -ag_postfix_mastercf->Run; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/mail_mastercf.scr new/yast2-mail-2.21.2/agents/mail_mastercf.scr --- old/yast2-mail-2.21.1/agents/mail_mastercf.scr 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/agents/mail_mastercf.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -/** - * $Id: mail_mastercf.scr 15230 2004-03-02 17:06:42Z choeger $ - * Summary: - * SCR Agent for reading/writing the Postfix configurations file - * /etc/postfix/master.cf - * Authors: - * - * Access: - * read/write - * See: - * - * - * The file specifies a map, but we represent it as a list to preserve - * preceding comments and the order of entries. - * list entries are" - * $[ "comment": " foo\n bar\n", "key": "root", "value": "joe, \\root" ] - * that is, comments have the leading '#' stripped but not the newline. - * - * Example: - * Read (.mail.postfix.mastercf) - */ -.mail.postfix.mastercf - -`ag_postfix_mastercf ( - `MasterCF ($[ - "path" : "/etc/postfix", - "stderr" : ">> /var/log/YaST2/pfmastercf.log", - ]) -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/configure new/yast2-mail-2.21.2/configure --- old/yast2-mail-2.21.1/configure 2013-01-30 12:11:16.000000000 +0100 +++ new/yast2-mail-2.21.2/configure 2013-05-28 15:25:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-mail 2.21.1. +# Generated by GNU Autoconf 2.69 for yast2-mail 2.21.2. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-mail' PACKAGE_TARNAME='yast2-mail' -PACKAGE_VERSION='2.21.1' -PACKAGE_STRING='yast2-mail 2.21.1' +PACKAGE_VERSION='2.21.2' +PACKAGE_STRING='yast2-mail 2.21.2' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1249,7 +1249,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-mail 2.21.1 to adapt to many kinds of systems. +\`configure' configures yast2-mail 2.21.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1320,7 +1320,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-mail 2.21.1:";; + short | recursive ) echo "Configuration of yast2-mail 2.21.2:";; esac cat <<\_ACEOF @@ -1400,7 +1400,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-mail configure 2.21.1 +yast2-mail configure 2.21.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1417,7 +1417,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-mail $as_me 2.21.1, which was +It was created by yast2-mail $as_me 2.21.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2356,7 +2356,7 @@ # Define the identity of the package. PACKAGE='yast2-mail' - VERSION='2.21.1' + VERSION='2.21.2' cat >>confdefs.h <<_ACEOF @@ -2479,7 +2479,7 @@ -VERSION="2.21.1" +VERSION="2.21.2" RPMNAME="yast2-mail" MAINTAINER="Peter Varkoly <[email protected]>" @@ -3494,7 +3494,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-mail $as_me 2.21.1, which was +This file was extended by yast2-mail $as_me 2.21.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3547,7 +3547,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-mail config.status 2.21.1 +yast2-mail config.status 2.21.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/configure.in new/yast2-mail-2.21.2/configure.in --- old/yast2-mail-2.21.1/configure.in 2013-01-30 12:11:13.000000000 +0100 +++ new/yast2-mail-2.21.2/configure.in 2013-05-28 15:25:54.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-mail dnl -dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.24.0 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-mail, 2.21.1, http://bugs.opensuse.org/, yast2-mail) +AC_INIT(yast2-mail, 2.21.2, http://bugs.opensuse.org/, yast2-mail) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.21.1" +VERSION="2.21.2" RPMNAME="yast2-mail" MAINTAINER="Peter Varkoly <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/permissions/Makefile.in new/yast2-mail-2.21.2/permissions/Makefile.in --- old/yast2-mail-2.21.1/permissions/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/permissions/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -491,7 +491,7 @@ dist-hook: check-syntax check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/MailServer.ycp new/yast2-mail-2.21.2/src/MailServer.ycp --- old/yast2-mail-2.21.1/src/MailServer.ycp 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/src/MailServer.ycp 2013-05-16 12:31:35.000000000 +0200 @@ -182,8 +182,6 @@ map LDAPSettings = Ldap::Export(); string DNSWarning = _("There is no main mail domain defined. Please fix it!"); - SCR::Execute(.ldap); - SCR::Execute (.ldap.bind); /* looking if a mail domain exist */ map searchmap = $[ "base_dn" : LDAPSettings["base_config_dn"]:"", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/Makefile.am new/yast2-mail-2.21.2/src/Makefile.am --- old/yast2-mail-2.21.1/src/Makefile.am 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/src/Makefile.am 2013-05-16 12:31:35.000000000 +0200 @@ -15,9 +15,9 @@ mail-standard.ycp \ mail-advanced.ycp \ mail-server_auto.ycp \ + mail-server_ldap-setup.ycp \ mail-server_proposal.ycp \ - mail-server_ldap-setup.ycp - + mail-server_update.ycp myynclude_DATA = \ helps.ycp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/Makefile.in new/yast2-mail-2.21.2/src/Makefile.in --- old/yast2-mail-2.21.1/src/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/src/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -279,8 +279,9 @@ mail-standard.ycp \ mail-advanced.ycp \ mail-server_auto.ycp \ + mail-server_ldap-setup.ycp \ mail-server_proposal.ycp \ - mail-server_ldap-setup.ycp + mail-server_update.ycp myynclude_DATA = \ helps.ycp \ @@ -866,7 +867,7 @@ dist-hook: check-syntax check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/YaPI/MailServer.pm new/yast2-mail-2.21.2/src/YaPI/MailServer.pm --- old/yast2-mail-2.21.1/src/YaPI/MailServer.pm 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/src/YaPI/MailServer.pm 2013-05-16 12:31:35.000000000 +0200 @@ -22,7 +22,7 @@ =cut - +BEGIN { push @INC, "/usr/lib/YaST2/servers_non_y2"; } package YaPI::MailServer; @@ -38,6 +38,7 @@ use POSIX; # Needed for setlocale() use Data::Dumper; use Net::IMAP; +use MasterCFParser; textdomain("mail"); our %TYPEINFO; @@ -68,21 +69,6 @@ # my $write_only = 0; -BEGIN { $TYPEINFO{ReadMasterCF} =["function", "any" ]; } -sub ReadMasterCF { - my $MasterCf = SCR->Read('.mail.postfix.mastercf'); - - return $MasterCf; -} - -BEGIN { $TYPEINFO{findService} =["function", "any" ]; } -sub findService { - my ($service, $command ) = @_; - - my $services = SCR->Read('.mail.postfix.mastercf.findService', $service, $command); - - return $services; -} =item * C<$GlobalSettings = ReadGlobalSettings($$AdminPassword)> @@ -188,7 +174,8 @@ my $MainCf = SCR->Read('.mail.postfix.main.table'); my $SaslPaswd = SCR->Read('.mail.postfix.saslpasswd.table'); - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { return $self->SetError( summary =>"Couln't open master.cf", code => "PARAM_CHECK_FAILED" ); @@ -223,7 +210,7 @@ } else { - my $smtpsrv = SCR->Execute('.mail.postfix.mastercf.findService', + my $smtpsrv = $msc->getServiceByAttributes( { 'service' => 'smtp', 'command' => 'smtp' }); if( defined $smtpsrv ) @@ -327,7 +314,8 @@ my $RelayHostPassword = $GlobalSettings->{'SendingMail'}{'RelayHost'}{'Password'}; my $MainCf = SCR->Read('.mail.postfix.main.table'); my $SaslPasswd = SCR->Read('.mail.postfix.saslpasswd.table'); - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { return $self->SetError( summary =>"Couln't open master.cf", code => "PARAM_CHECK_FAILED" ); @@ -343,12 +331,12 @@ # at master.cf if smt is started if($SendingMailType ne 'NONE') { - my $smtpsrv = SCR->Execute('.mail.postfix.mastercf.findService', + my $smtpsrv = $msc->getServiceByAttributes( { 'service' => 'smtp', 'command' => 'smtp' }); if(! defined $smtpsrv ) { - SCR->Execute('.mail.postfix.mastercf.addService', { 'service' => 'smtp', + $msc->addService({ 'service' => 'smtp', 'type' => 'inet', 'private' => 'n', 'unpriv' => '-', @@ -382,7 +370,7 @@ } elsif ($SendingMailType eq 'NONE') { - SCR->Execute('.mail.postfix.mastercf.deleteService', { 'service' => 'smtp', 'command' => 'smtp' }); + $msc->deleteService( { 'service' => 'smtp', 'command' => 'smtp' }); } else { @@ -431,7 +419,7 @@ SCR->Write('.mail.postfix.main',undef); SCR->Write('.mail.postfix.saslpasswd.table',$SaslPasswd); SCR->Write('.mail.postfix.saslpasswd',undef); - SCR->Write('.mail.postfix.mastercf',undef); + $msc->writeMasterCF(); return 1; } @@ -1117,7 +1105,8 @@ # First we read the main.cf and master.cf my $MainCf = SCR->Read('.mail.postfix.main.table'); - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { return $self->SetError( summary =>"Couln't open master.cf", code => "PARAM_CHECK_FAILED" ); @@ -1168,10 +1157,10 @@ } # Now we looking for if vscan (virusscanning) is started. - my $vscanin = SCR->Execute('.mail.postfix.mastercf.findService', + my $vscanin = $msc->getServiceByAttributes( { 'service' => 'localhost:10025', 'command' => 'smtpd'} ); - my $vscanout = SCR->Execute('.mail.postfix.mastercf.findService', + my $vscanout = $msc->getServiceByAttributes( { 'service' => 'amavis', 'command' => 'lmtp'} ); my $content_filter = read_attribute($MainCf,'content_filter'); @@ -1245,7 +1234,8 @@ # First we read the main.cf my $MainCf = SCR->Read('.mail.postfix.main.table'); - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { return $self->SetError( summary =>"Couln't open master.cf", code => "PARAM_CHECK_FAILED" ); @@ -1357,7 +1347,6 @@ } } - SCR->Read('.mail.postfix.mastercf'); if( $MailPrevention->{'VirusScanning'} ) { $MailPrevention->{'VSCount'} = 5 if( ! defined $MailPrevention->{'VSCount'}); @@ -1369,51 +1358,45 @@ description => "activating the virus scanner failed: $err"); } # This is only for systems updated from SLES10 - my $smtps = SCR->Execute('.mail.postfix.mastercf.findService', - { 'service' => 'smtps', 'command' => 'smtpd' }); - if( ref($smtps) eq 'ARRAY' && defined $smtps->[0]->{options} ) - { - my $opts = $smtps->[0]->{options}; - if ( defined $opts->{'content_filter'} ) - { - delete $opts->{'content_filter'}; - SCR->Execute('.mail.postfix.mastercf.modifyService', - { 'service' => 'smtps', - 'command' => 'smtpd', - 'maxproc' => '-', - 'options' => $opts } ); - } - } - my $smtp = SCR->Execute('.mail.postfix.mastercf.findService', - { 'service' => 'smtp', 'command' => 'smtpd' }); - if( ref($smtp) eq 'ARRAY' && defined $smtp->[0]->{options} ) - { - my $opts = $smtp->[0]->{options}; - if ( defined $opts->{'content_filter'} ) - { - delete $opts->{'content_filter'}; - SCR->Execute('.mail.postfix.mastercf.modifyService', - { 'service' => 'smtp', - 'command' => 'smtpd', - 'maxproc' => '-', - 'options' => $opts } ); - } - } + my $smtps = $msc->getServiceByAttributes( { 'service' => 'smtps', 'command' => 'smtpd' }); + if( ref($smtps) eq 'ARRAY' && defined $smtps->[0]->{options} ) + { + my $opts = $smtps->[0]->{options}; + if ( defined $opts->{'content_filter'} ) + { + delete $opts->{'content_filter'}; + $msc->modifyService( + { 'service' => 'smtps', + 'command' => 'smtpd', + 'maxproc' => '-', + 'options' => $opts } ); + } + } + my $smtp = $msc->getServiceByAttributes( { 'service' => 'smtp', 'command' => 'smtpd' }); + if( ref($smtp) eq 'ARRAY' && defined $smtp->[0]->{options} ) + { + my $opts = $smtp->[0]->{options}; + if ( defined $opts->{'content_filter'} ) + { + delete $opts->{'content_filter'}; + $msc->modifyService( + { 'service' => 'smtp', + 'command' => 'smtpd', + 'maxproc' => '-', + 'options' => $opts } ); + } + } # End This is only for systems updated from SLES10 - if( SCR->Execute('.mail.postfix.mastercf.findService', - { 'service' => 'localhost:10025', 'command' => 'smtpd' })) + if( $msc->getServiceByAttributes( { 'service' => 'localhost:10025', 'command' => 'smtpd' })) { - SCR->Execute('.mail.postfix.mastercf.deleteService', - { 'service' => 'localhost:10025', 'command' => 'smtpd' }); + $msc->deleteService( { 'service' => 'localhost:10025', 'command' => 'smtpd' }); } - if( SCR->Execute('.mail.postfix.mastercf.findService', - { 'service' => 'amavis', 'command' => 'lmtp' })) + if( $msc->getServiceByAttributes( { 'service' => 'amavis', 'command' => 'lmtp' })) { - SCR->Execute('.mail.postfix.mastercf.deleteService', - { 'service' => 'amavis', 'command' => 'lmtp' }); + $msc->deleteService( { 'service' => 'amavis', 'command' => 'lmtp' }); } # create smtpd pocess for getting back the emails - SCR->Execute('.mail.postfix.mastercf.addService', + $msc->addService( { 'service' => 'amavis', 'command' => 'lmtp', 'type' => 'unix', @@ -1426,7 +1409,7 @@ lmtp_send_xforward_command => 'yes', disable_dns_lookups => 'yes', max_use => 20 } } ); - SCR->Execute('.mail.postfix.mastercf.addService', + $msc->addService( { 'service' => 'localhost:10025', 'command' => 'smtpd', 'type' => 'inet', @@ -1458,10 +1441,8 @@ } else { - SCR->Execute('.mail.postfix.mastercf.deleteService', - { 'service' => 'localhost:10025', 'command' => 'smtpd' }); - SCR->Execute('.mail.postfix.mastercf.deleteService', - { 'service' => 'amavis', 'command' => 'lmtp' }); + $msc->deleteService( { 'service' => 'localhost:10025', 'command' => 'smtpd' }); + $msc->deleteService( { 'service' => 'amavis', 'command' => 'lmtp' }); write_attribute($MainCf,'content_filter',''); Service->Stop('amavis'); @@ -1474,8 +1455,7 @@ check_ldap_configuration('access',$ldapMap); SCR->Write('.mail.postfix.main.table',$MainCf); SCR->Write('.mail.postfix.main',undef); - SCR->Write('.mail.postfix.mastercf',undef); - + $msc->writeMasterCF(); # make IMAP connection my $imap = new Net::IMAP($imaphost, Debug => 0); if( $imap ) @@ -1759,12 +1739,13 @@ code => "PARAM_CHECK_FAILED" ); } # Searching for the tlsmanager service - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { - return $self->SetError( summary =>"Couln't open master.cf", - code => "PARAM_CHECK_FAILED" ); + return $self->SetError( summary =>"Couln't open master.cf", + code => "PARAM_CHECK_FAILED" ); } - my $tlsmgr = SCR->Execute('.mail.postfix.mastercf.findService', + my $tlsmgr = $msc->getServiceByAttributes( { 'service' => 'tlsmgr', 'command' => 'tlsmgr' }); if($MailRelaying->{'SMTPDTLSMode'} ne 'none') @@ -1790,7 +1771,7 @@ } if(! defined $tlsmgr ) { - SCR->Execute('.mail.postfix.mastercf.addService', + $msc->addService( { 'service' => 'tlsmgr', 'type' => 'unix', 'private' => '-', @@ -1805,10 +1786,10 @@ { if( defined $tlsmgr ) { - SCR->Execute('.mail.postfix.mastercf.deleteService', {'service' => 'tlsmgr','command' => 'tlsmgr'}); + $msc->deleteService( {'service' => 'tlsmgr','command' => 'tlsmgr'}); } } - SCR->Write('.mail.postfix.mastercf',undef); + $msc->writeMasterCF; SCR->Write('.mail.postfix.main.table',$MainCf); SCR->Write('.mail.postfix.main',undef); @@ -2906,12 +2887,13 @@ my $MainCf = SCR->Read('.mail.postfix.main.table'); # Setup the tlsmanager service if necessary - if( ! SCR->Read('.mail.postfix.mastercf') ) + my $msc = new MasterCFParser(); + if( $msc->readMasterCF() ) { - return $self->SetError( summary =>"Couln't open master.cf", - code => "PARAM_CHECK_FAILED" ); + return $self->SetError( summary =>"Couln't open master.cf", + code => "PARAM_CHECK_FAILED" ); } - my $tlsmgr = SCR->Execute('.mail.postfix.mastercf.findService', + my $tlsmgr = $msc->getServiceByAttributes( { 'service' => 'tlsmgr', 'command' => 'tlsmgr' }); if( $TLS eq "use" ) @@ -2925,7 +2907,7 @@ } if(! defined $tlsmgr ) { - SCR->Execute('.mail.postfix.mastercf.addService', + $msc->addService( { 'service' => 'tlsmgr', 'type' => 'unix', 'private' => '-', @@ -2940,7 +2922,7 @@ { if( defined $tlsmgr ) { - SCR->Execute('.mail.postfix.mastercf.deleteService', {'service' => 'tlsmgr','command' => 'tlsmgr'}); + $msc->delete( {'service' => 'tlsmgr','command' => 'tlsmgr'}); } } write_attribute($MainCf,'masquerade_classes','envelope_sender, header_sender, header_recipient'); @@ -2949,12 +2931,36 @@ write_ldap_maps($MainCf,$ldapMap); SCR->Write('.mail.postfix.main.table',$MainCf); SCR->Write('.mail.postfix.main',undef); - SCR->Write('.mail.postfix.mastercf',undef); + $msc->writeMasterCF(); SCR->Execute(".target.bash", "touch /var/adm/yast2-mail-server-used"); return 1; } +=item * + +C<boolean = UpdateMailServerTables($AdminPassword)> + +Funktion to update the mail server tables +Needed Parameters are: + $AdminPassword the Adminstrator Psssword + +=cut + +BEGIN { $TYPEINFO{UpdateMailServerTables} = ["function", "boolean" ,"string"]; } +sub UpdateMailServerTables { + my $self = shift; + my $AdminPassword = shift; + my $ldapMap = $self->ReadLDAPDefaults($AdminPassword); + my $MainCf = SCR->Read('.mail.postfix.main.table'); + write_ldap_maps($MainCf,$ldapMap); + SCR->Write('.mail.postfix.main.table',$MainCf); + SCR->Write('.mail.postfix.main',undef); + SCR->Execute(".target.bash", "touch /var/adm/yast2-mail-server-ldap-tables-updated"); + Service->Restart('postfix'); + return 1; +} + sub activate_virus_scanner { my $VSCount = shift || 5; use File::Copy; @@ -3116,15 +3122,27 @@ sub write_ldap_maps($$) { my( $MainCf, $ldapMap ) = @_; + my @AliasMaps = qw( + alias_maps + galias_maps_both + galias_maps_member + galias_maps_folder + galias_maps_forward + ualias_maps_folder + ualias_maps_forward + ); my $alias_maps = read_attribute($MainCf,'alias_maps'); - if($alias_maps !~ /ldap:\/etc\/postfix\/ldapalias_maps_folder.cf/) - { - $alias_maps .= ', ldap:/etc/postfix/ldapalias_maps_folder.cf'; - } - if($alias_maps !~ /ldap:\/etc\/postfix\/ldapalias_maps.cf/) + $alias_maps =~ s#ldap:/etc/postfix/ldap.*cf##g; + $alias_maps =~ s# ##g; $alias_maps =~ s# ##g; + $alias_maps =~ s#,,##g; $alias_maps =~ s#,,##g; + foreach my $i ( @AliasMaps ) { - $alias_maps .= ', ldap:/etc/postfix/ldapalias_maps.cf'; + check_ldap_configuration($i,$ldapMap); + if($alias_maps !~ /ldap:\/etc\/postfix\/ldap$i.cf/) + { + $alias_maps .= ', ldap:/etc/postfix/ldap'.$i.'.cf'; + } } write_attribute($MainCf,'alias_maps',$alias_maps); my $masquerade_domains = read_attribute($MainCf,'masquerade_domains'); @@ -3142,20 +3160,15 @@ write_attribute($MainCf,'smtpd_sender_restrictions','ldap:/etc/postfix/ldapaccess.cf'); write_attribute($MainCf,'smtp_tls_per_site','ldap:/etc/postfix/ldapsmtp_tls_per_site.cf'); write_attribute($MainCf,'transport_maps','ldap:/etc/postfix/ldaptransport_maps.cf'); - write_attribute($MainCf,'virtual_alias_maps', 'ldap:/etc/postfix/ldapuser_recipient_maps.cf, ldap:/etc/postfix/ldapvalias_maps_both.cf, ldap:/etc/postfix/ldapvalias_maps_member.cf, ldap:/etc/postfix/ldapvalias_maps_folder.cf, ldap:/etc/postfix/ldapvalias_maps_forward.cf'); + write_attribute($MainCf,'virtual_alias_maps', 'ldap:/etc/postfix/ldapuser_recipient_maps.cf, ldap:/etc/postfix/ldapgroup_recipient_maps.cf'); write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_domains.cf'); check_ldap_configuration('access',$ldapMap); - check_ldap_configuration('alias_maps',$ldapMap); - check_ldap_configuration('alias_maps_folder',$ldapMap); check_ldap_configuration('masquerade_domains',$ldapMap); check_ldap_configuration('mydestination',$ldapMap); check_ldap_configuration('smtp_tls_per_site',$ldapMap); check_ldap_configuration('transport_maps',$ldapMap); check_ldap_configuration('user_recipient_maps',$ldapMap); - check_ldap_configuration('valias_maps_both',$ldapMap); - check_ldap_configuration('valias_maps_member',$ldapMap); - check_ldap_configuration('valias_maps_folder',$ldapMap); - check_ldap_configuration('valias_maps_forward',$ldapMap); + check_ldap_configuration('group_recipient_maps',$ldapMap); check_ldap_configuration('virtual_alias_domains',$ldapMap); } @@ -3170,17 +3183,19 @@ my %query_filter = ( 'access' => '(&(objectClass=suseMailAccess)(suseMailClient=%s))', 'alias_maps' => '(&(objectClass=suseMailTable)(tableKey=%s))', - 'alias_maps_folder' => '(&(objectClass=suseMailRecipient)(cn=%s)(suseDeliveryToFolder=yes))', 'masquerade_domains' => '(&(objectClass=suseMailDomain)(zoneName=%s)(suseMailDomainMasquerading=yes))', 'mydestination' => '(&(objectClass=suseMailDomain)(zoneName=%s)(relativeDomainName=@)(!(suseMailDomainType=virtual)))', 'mynetworks' => '(&(objectClass=suseMailMyNetworks)(suseMailClient=%s))', 'smtp_tls_per_site' => '(&(objectClass=suseMailTransport)(suseMailTransportDestination=%s))', 'transport_maps' => '(&(objectClass=suseMailTransport)(suseMailTransportDestination=%s))', - 'user_recipient_maps' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s))', - 'valias_maps_both' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(suseDeliveryToMember=yes)(suseDeliveryToFolder=yes))', - 'valias_maps_member' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(suseDeliveryToMember=yes)(!(suseDeliveryToFolder=yes)))', - 'valias_maps_folder' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(!(suseDeliveryToMember=yes))(suseDeliveryToFolder=yes))', - 'valias_maps_forward' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(!(suseDeliveryToMember=yes))(!(suseDeliveryToFolder=yes)))', + 'user_recipient_maps' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(!(mailEnabled=no))(|(!(suseDeliveryToFolder=no))(suseMailForwardAddress=*)))', + 'group_recipient_maps' => '(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(|(suseDeliveryToFolder=yes)(suseDeliveryToMember=yes)(suseMailForwardAddress=*)))', + 'ualias_maps_folder' => '(&(objectClass=suseMailRecipient)(uid=%s)(!(suseDeliveryToFolder=no)))', + 'ualias_maps_forward' => '(&(objectClass=suseMailRecipient)(uid=%s)(suseDeliveryToFolder=no))', + 'galias_maps_both' => '(&(objectClass=suseMailRecipient)(cn=%s)(suseDeliveryToMember=yes)(suseDeliveryToFolder=yes))', + 'galias_maps_member' => '(&(objectClass=suseMailRecipient)(cn=%s)(suseDeliveryToMember=yes)(!(suseDeliveryToFolder=yes)))', + 'galias_maps_folder' => '(&(objectClass=suseMailRecipient)(cn=%s)(!(suseDeliveryToMember=yes))(suseDeliveryToFolder=yes))', + 'galias_maps_forward' => '(&(objectClass=suseMailRecipient)(cn=%s)(!(suseDeliveryToMember=yes))(!(suseDeliveryToFolder=yes)))', 'virtual_alias_domains' => '(&(objectClass=suseMailDomain)(zoneName=%s)(relativeDomainName=@)(suseMailDomainType=virtual))', 'canonical_maps' => '(&(objectClass=suseCanonicalTable)(tableKey=%s)(valueType=both))', 'recipient_canonical_maps'=> '(&(objectClass=suseCanonicalTable)(tableKey=%s)(valueType=recipient))', @@ -3189,63 +3204,69 @@ my %result_attribute = ( 'access' => 'suseMailAction', 'alias_maps' => 'tableValue', - 'alias_maps_folder' => 'suseMailCommand', 'masquerade_domains' => 'zoneName', 'mydestination' => 'zoneName', 'mynetworks' => 'suseMailClient', 'transport_maps' => 'suseMailTransportNexthop', - 'valias_maps_both' => 'suseMailForwardAddress,cn,uid', - 'valias_maps_member' => 'suseMailForwardAddress,uid', - 'valias_maps_folder' => 'suseMailForwardAddress,cn', - 'valias_maps_forward' => 'suseMailForwardAddress', + 'ualias_maps_folder' => 'suseMailForwardAddress,uid', + 'ualias_maps_forward' => 'suseMailForwardAddress', + 'galias_maps_both' => 'suseMailForwardAddress,suseMailCommand,uid', + 'galias_maps_member' => 'suseMailForwardAddress,uid', + 'galias_maps_folder' => 'suseMailForwardAddress,suseMailCommand', + 'galias_maps_forward' => 'suseMailForwardAddress', 'virtual_alias_domains' => 'zoneName', 'canonical_maps' => 'tableValue', 'recipient_canonical_maps'=> 'tableValue', 'smtp_tls_per_site' => 'suseMailTransportNexthop', 'sender_canonical_maps' => 'tableValue', - 'user_recipient_maps' => 'uid,suseMailForwardAddress' + 'user_recipient_maps' => 'uid', + 'group_recipient_maps' => 'cn' ); my %scope = ( 'access' => 'one', 'alias_maps' => 'one', - 'alias_maps_folder' => 'one', 'masquerade_domains' => 'sub', 'mydestination' => 'sub', 'mynetworks' => 'one', 'transport_maps' => 'one', 'smtp_tls_per_site' => 'one', - 'valias_maps_both' => 'one', - 'valias_maps_member' => 'one', - 'valias_maps_folder' => 'one', - 'valias_maps_forward' => 'one', + 'ualias_maps_folder' => 'one', + 'ualias_maps_forward' => 'one', + 'galias_maps_both' => 'one', + 'galias_maps_member' => 'one', + 'galias_maps_folder' => 'one', + 'galias_maps_forward' => 'one', 'virtual_alias_domains' => 'sub', 'canonical_maps' => 'one', 'recipient_canonical_maps'=> 'one', 'sender_canonical_maps' => 'one', - 'user_recipient_maps' => 'one' + 'user_recipient_maps' => 'one', + 'group_recipient_maps' => 'one' ); my %base = ( 'access' => $ldapMap->{'mail_config_dn'}, 'alias_maps' => 'ou=Aliases,'.$ldapMap->{'mail_config_dn'}, - 'alias_maps_folder' => $ldapMap->{'group_config_dn'}, 'masquerade_domains' => $ldapMap->{'dns_config_dn'}, 'mydestination' => $ldapMap->{'dns_config_dn'}, 'mynetworks' => $ldapMap->{'mail_config_dn'}, 'smtp_tls_per_site' => $ldapMap->{'mail_config_dn'}, 'transport_maps' => $ldapMap->{'mail_config_dn'}, - 'valias_maps_both' => $ldapMap->{'group_config_dn'}, - 'valias_maps_member' => $ldapMap->{'group_config_dn'}, - 'valias_maps_folder' => $ldapMap->{'group_config_dn'}, - 'valias_maps_forward' => $ldapMap->{'group_config_dn'}, + 'ualias_maps_folder' => $ldapMap->{'user_config_dn'}, + 'ualias_maps_forward' => $ldapMap->{'user_config_dn'}, + 'galias_maps_both' => $ldapMap->{'group_config_dn'}, + 'galias_maps_member' => $ldapMap->{'group_config_dn'}, + 'galias_maps_folder' => $ldapMap->{'group_config_dn'}, + 'galias_maps_forward' => $ldapMap->{'group_config_dn'}, 'virtual_alias_domains' => $ldapMap->{'dns_config_dn'}, 'canonical_maps' => 'ou=Canonical,'.$ldapMap->{'mail_config_dn'}, 'recipient_canonical_maps'=> 'ou=Canonical,'.$ldapMap->{'mail_config_dn'}, 'sender_canonical_maps' => 'ou=Canonical,'.$ldapMap->{'mail_config_dn'}, + 'group_recipient_maps' => $ldapMap->{'group_config_dn'}, 'user_recipient_maps' => $ldapMap->{'user_config_dn'} ); my %special_result_attribute = ( - 'valias_maps_both' => 'member', - 'valias_maps_member' => 'member' + 'galias_maps_both' => 'member', + 'galias_maps_member' => 'member' ); my %terminal_result_attribute = ( @@ -3254,11 +3275,11 @@ ); -if( ! defined $result_attribute{$config} ) -{ - print STDERR "BAJAVAN $config"; - return; -} + if( ! defined $result_attribute{$config} ) + { + print STDERR "Unknown LDAP-table: $config\n"; + return; + } #First we read the whool main.cf configuration my $LDAPCF = SCR->Read('.mail.ldaptable',$config); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/YaPI/Makefile.in new/yast2-mail-2.21.2/src/YaPI/Makefile.in --- old/yast2-mail-2.21.1/src/YaPI/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/src/YaPI/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -490,7 +490,7 @@ dist-hook: check-syntax check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/mail-server_update.ycp new/yast2-mail-2.21.2/src/mail-server_update.ycp --- old/yast2-mail-2.21.1/src/mail-server_update.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-mail-2.21.2/src/mail-server_update.ycp 2013-05-16 12:31:35.000000000 +0200 @@ -0,0 +1,12 @@ +{ + textdomain "openschool-server"; + import "YaPI::MailServer"; + import "Ldap"; + map out = (map)SCR::Execute( .target.bash_output, "/usr/sbin/oss_get_admin_pw"); + string ldappasswd = tostring(out["stdout"]:""); + if( ldappasswd == "" ) + { + ldappasswd = Ldap::GetLDAPPassword(false); + } + YaPI::MailServer::UpdateMailServerTables(ldappasswd); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/mail.ycp new/yast2-mail-2.21.2/src/mail.ycp --- old/yast2-mail-2.21.1/src/mail.ycp 2013-01-22 11:29:06.000000000 +0100 +++ new/yast2-mail-2.21.2/src/mail.ycp 2013-05-16 12:31:35.000000000 +0200 @@ -72,7 +72,7 @@ term tskip_ask = `Left(`CheckBox(`id(`skip_ask), _("Skip this page in the future"))); string status = _("Mail server is not configured.")+"\n"+ _("Select configuration type according your needs.")+"\n"+ - _("If you want to use sendmail as your MTA, you have to use the Standard configuration.")+ + _("If you want to use sendmail as your MTA, you have to use the Standard configuration.")+"\n"+ _("The Advanced configuration use LDAP as backend and will configure your system as LDAP-Client and setup an LDAP-Server if necessary."); if( first ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/users-plugin/Makefile.in new/yast2-mail-2.21.2/users-plugin/Makefile.in --- old/yast2-mail-2.21.1/users-plugin/Makefile.in 2013-01-30 12:11:17.000000000 +0100 +++ new/yast2-mail-2.21.2/users-plugin/Makefile.in 2013-05-28 15:25:59.000000000 +0200 @@ -520,7 +520,7 @@ dist-hook: check-syntax check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
