Hello community, here is the log from the commit of package yast2-mail for openSUSE:Factory checked in at 2012-01-04 07:33:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-mail (Old) and /work/SRC/openSUSE:Factory/.yast2-mail.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-mail", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-mail/yast2-mail.changes 2011-10-04 18:01:45.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-mail.new/yast2-mail.changes 2012-01-04 07:33:13.000000000 +0100 @@ -1,0 +2,11 @@ +Fri Nov 4 11:28:24 UTC 2011 - [email protected] + +- FATE#311272: Do not rewrite postfix.cf via SuSEconfig +- FATE#310517: DKIM and DomainKeys support + +------------------------------------------------------------------- +Wed Oct 26 07:33:05 UTC 2011 - [email protected] + +- bnc#723742 - SLES11_SP2_LOC : The 'No Outgoing Mail' radio button can't check in Mail server global settings panel! + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-mail.spec ++++++ --- /var/tmp/diff_new_pack.LJKKLg/_old 2012-01-04 07:33:14.000000000 +0100 +++ /var/tmp/diff_new_pack.LJKKLg/_new 2012-01-04 07:33:14.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-mail # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-mail-%{version}.tar.bz2 +Source0: yast2-mail-2.21.1.tar.bz2 Prefix: /usr @@ -70,7 +70,7 @@ configuration. %prep -%setup -n yast2-mail-%{version} +%setup -n yast2-mail-2.21.1 %build %{prefix}/bin/y2tool y2autoconf @@ -145,6 +145,7 @@ /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 +%attr(0755,root,root) /usr/lib/YaST2/servers_non_y2/setup_dkim_verifying.pl %dir /etc/openldap/ %dir /etc/openldap/schema/ ++++++ yast2-mail-2.21.1.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.1/Makefile.am --- old/yast2-mail-2.21.1/Makefile.am 2011-10-04 10:35:18.000000000 +0200 +++ new/yast2-mail-2.21.1/Makefile.am 2011-07-28 10:32:52.000000000 +0200 @@ -20,6 +20,7 @@ IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME)) DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools) +ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl) COPYRIGHT_files_gpl = README COPYING @@ -154,7 +155,7 @@ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \ done -package: check-up-to-date check-tagversion check-textdomain package-local +package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local TAGVERSION = $(Y2TOOL) tagversion @@ -184,6 +185,21 @@ check-parse: @echo "Not running parseycp." +check-all-packages: + @if [ ! -e "$(ALL_PACKAGES)" ]; then \ + echo ERROR: "Can't find $(ALL_PACKAGES)"; false; \ + fi + @if ! grep -q "^$(RPMNAME)[[:space:]]" $(ALL_PACKAGES); then \ + echo ERROR: "$(RPMNAME) not in $(ALL_PACKAGES)"; false; \ + fi + @if grep -q "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); then \ + echo ERROR: "$(RPMNAME) info in $(ALL_PACKAGES) contains some unknown (?) fields:"; \ + echo; \ + grep "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); \ + echo; \ + false; \ + fi + check-textdomain: $(Y2TOOL) check-textdomain $(srcdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/Makefile.in new/yast2-mail-2.21.1/Makefile.in --- old/yast2-mail-2.21.1/Makefile.in 2011-10-04 10:35:21.000000000 +0200 +++ new/yast2-mail-2.21.1/Makefile.in 2011-07-28 10:32:55.000000000 +0200 @@ -263,6 +263,7 @@ # do we do Makefile.am for devtools? It is a little special... IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME)) DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools) +ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl) COPYRIGHT_files_gpl = README COPYING COPYRIGHT_files_yast = YAST_LICENSE README COPYING COPYRIGHT.english \ @@ -903,7 +904,7 @@ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \ done -package: check-up-to-date check-tagversion check-textdomain package-local +package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local check-up-to-date check-cvs-up-to-date check-svn-up-to-date: if [ -d $(srcdir)/CVS ]; then \ @@ -931,6 +932,21 @@ check-parse: @echo "Not running parseycp." +check-all-packages: + @if [ ! -e "$(ALL_PACKAGES)" ]; then \ + echo ERROR: "Can't find $(ALL_PACKAGES)"; false; \ + fi + @if ! grep -q "^$(RPMNAME)[[:space:]]" $(ALL_PACKAGES); then \ + echo ERROR: "$(RPMNAME) not in $(ALL_PACKAGES)"; false; \ + fi + @if grep -q "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); then \ + echo ERROR: "$(RPMNAME) info in $(ALL_PACKAGES) contains some unknown (?) fields:"; \ + echo; \ + grep "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); \ + echo; \ + false; \ + fi + check-textdomain: $(Y2TOOL) check-textdomain $(srcdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/Makefile.am new/yast2-mail-2.21.1/agents/Makefile.am --- old/yast2-mail-2.21.1/agents/Makefile.am 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/agents/Makefile.am 2011-10-26 09:33:42.000000000 +0200 @@ -1,13 +1,13 @@ # # Makefile.am for y2c_mail/agents # -# $Id: Makefile.am 38214 2007-05-30 18:57:59Z varkoly $ +# $Id: Makefile.am 66587 2011-10-26 07:33:40Z varkoly $ # agent_SCRIPTS = ag_fetchmailrc \ ag_smtp_auth \ ag_mailtable \ - \ + setup_dkim_verifying.pl \ ag_mailconfig \ ag_postfix_mastercf \ MasterCFParser.pm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/Makefile.in new/yast2-mail-2.21.1/agents/Makefile.in --- old/yast2-mail-2.21.1/agents/Makefile.in 2011-10-04 10:35:21.000000000 +0200 +++ new/yast2-mail-2.21.1/agents/Makefile.in 2011-11-03 17:15:00.000000000 +0100 @@ -18,7 +18,7 @@ # # Makefile.am for y2c_mail/agents # -# $Id: Makefile.am 38214 2007-05-30 18:57:59Z varkoly $ +# $Id: Makefile.am 66587 2011-10-26 07:33:40Z varkoly $ # @@ -203,7 +203,7 @@ agent_SCRIPTS = ag_fetchmailrc \ ag_smtp_auth \ ag_mailtable \ - \ + setup_dkim_verifying.pl \ ag_mailconfig \ ag_postfix_mastercf \ MasterCFParser.pm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/agents/setup_dkim_verifying.pl new/yast2-mail-2.21.1/agents/setup_dkim_verifying.pl --- old/yast2-mail-2.21.1/agents/setup_dkim_verifying.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-mail-2.21.1/agents/setup_dkim_verifying.pl 2011-07-28 10:22:44.000000000 +0200 @@ -0,0 +1,190 @@ +#!/usr/bin/perl + +BEGIN { push @INC, "/usr/lib/YaST2/servers_non_y2"; } + +use strict; +use MasterCFParser; +my $DOMAIN=`postconf -h mydomain`; +chomp $DOMAIN; + +if( ! "$DOMAIN" ) { + print "Bad postfix configuration. mydomain can not be detected"; + exit 1; +} + +#Generate the key +if( ! -e "/var/db/dkim/$DOMAIN.pem" ){ + print "Creating /var/db/dkim/$DOMAIN.pem\n"; + system( "mkdir -p /var/db/dkim/; amavisd genrsa /var/db/dkim/$DOMAIN.pem;"); +} + +#Introduce key into /etc/amavisd.conf +my $amavisd = ""; +my $enable_dkim_signing = 0; +open IN, "</etc/amavisd.conf"; +while(<IN>) +{ + if( /^\$inet_socket_port/ ) + { + $amavisd .= '$inet_socket_port = [10024,10026];'."\n"; + next; + } + if( /^\$enable_dkim_signing/ ) + { + $amavisd .= '$enable_dkim_signing = 1;'."\n"; + $enable_dkim_signing = 1; + next; + } + if( $enable_dkim_signing ) + { + my $dkim = "dkim_key('$DOMAIN', 'default', '/var/db/dkim/$DOMAIN.pem');"; + if( ! /$dkim/ ) + { + $amavisd .= "$dkim\n$_"; + } + $enable_dkim_signing = 0; + next; + } + $amavisd .= $_; +} +close IN; +system("cp /etc/amavisd.conf /etc/amavisd.conf.backup"); +open OUT, ">/etc/amavisd.conf"; +print OUT $amavisd; +close OUT; + +#Now we adapt master.cf +my $msc = new MasterCFParser(); +$msc->readMasterCF(); + +if( ! $msc->serviceExists( { service => 'submission' , command => 'smtpd' } )) +{ + if( $msc->addService( { 'service' => 'submission', + 'type' => 'inet', + 'private' => 'n', + 'unpriv' => '-', + 'chroot' => 'n', + 'wakeup' => '-', + 'maxproc' => '-', + 'command' => 'smtpd', + 'options' => { 'content_filte' => 'amavis:[127.0.0.1]:10026', + 'smtpd_recipient_restrictions' => 'permit_sasl_authenticated,permit_mynetworks,reject' } + }) ) + { + print "ERROR in addService()\n"; + } +} +else +{ + if( $msc->modifyService( { 'service' => 'submission', + 'type' => 'inet', + 'private' => 'n', + 'unpriv' => '-', + 'chroot' => 'n', + 'wakeup' => '-', + 'maxproc' => '-', + 'command' => 'smtpd', + 'options' => { 'content_filte' => 'amavis:[127.0.0.1]:10026', + 'smtpd_recipient_restrictions' => 'permit_sasl_authenticated,permit_mynetworks,reject' } + }) ) + { + print "ERROR in modifyService()\n"; + } +} + +$msc->writeMasterCF(); +#!/usr/bin/perl + +BEGIN { push @INC, "/usr/lib/YaST2/servers_non_y2"; } + +use strict; +use MasterCFParser; +my $DOMAIN=`postconf -h mydomain`; +chomp $DOMAIN; + +if( ! "$DOMAIN" ) { + print "Bad postfix configuration. mydomain can not be detected"; + exit 1; +} + +#Generate the key +if( ! -e "/var/db/dkim/$DOMAIN.pem" ){ + print "Creating /var/db/dkim/$DOMAIN.pem\n"; + system( "mkdir -p /var/db/dkim/; amavisd genrsa /var/db/dkim/$DOMAIN.pem"); +} + +#Introduce key into /etc/amavisd.conf +my $amavisd = ""; +my $enable_dkim_signing = 0; +open IN, "</etc/amavisd.conf"; +while(<IN>) +{ + if( /^\$inet_socket_port/ ) + { + $amavisd .= '$inet_socket_port = [10024,10026];'."\n"; + next; + } + if( /^\$enable_dkim_signing/ ) + { + $amavisd .= '$enable_dkim_signing = 1;'."\n"; + $enable_dkim_signing = 1; + next; + } + if( $enable_dkim_signing ) + { + my $dkim = "dkim_key('$DOMAIN', 'default', '/var/db/dkim/$DOMAIN.pem');"; + if( ! /dkim_key\('$DOMAIN', 'default'/ ) + { + $amavisd .= "$dkim\n$_"; + next; + } + $enable_dkim_signing = 0; + } + $amavisd .= $_; +} +close IN; +system("cp /etc/amavisd.conf /etc/amavisd.conf.backup"); +open OUT, ">/etc/amavisd.conf"; +print OUT $amavisd; +close OUT; + +#Now we adapt master.cf +my $msc = new MasterCFParser(); +$msc->readMasterCF(); + +if( ! $msc->serviceExists( { service => 'submission' , command => 'smtpd' } )) +{ + if( $msc->addService( { 'service' => 'submission', + 'type' => 'inet', + 'private' => 'n', + 'unpriv' => '-', + 'chroot' => 'n', + 'wakeup' => '-', + 'maxproc' => '-', + 'command' => 'smtpd', + 'options' => { 'content_filte' => 'amavis:[127.0.0.1]:10026', + 'smtpd_recipient_restrictions' => 'permit_sasl_authenticated,permit_mynetworks,reject' } + }) ) + { + print "ERROR in addService()\n"; + } +} +else +{ + if( $msc->modifyService( { 'service' => 'submission', + 'type' => 'inet', + 'private' => 'n', + 'unpriv' => '-', + 'chroot' => 'n', + 'wakeup' => '-', + 'maxproc' => '-', + 'command' => 'smtpd', + 'options' => { 'content_filte' => 'amavis:[127.0.0.1]:10026', + 'smtpd_recipient_restrictions' => 'permit_sasl_authenticated,permit_mynetworks,reject' } + }) ) + { + print "ERROR in modifyService()\n"; + } +} + +$msc->wramavisiteMasterCF(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/configure new/yast2-mail-2.21.1/configure --- old/yast2-mail-2.21.1/configure 2011-10-04 10:35:20.000000000 +0200 +++ new/yast2-mail-2.21.1/configure 2011-07-28 10:32:55.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for yast2-mail 2.21.1. +# Generated by GNU Autoconf 2.68 for yast2-mail 2.20.0. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -559,8 +559,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.20.0' +PACKAGE_STRING='yast2-mail 2.20.0' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1231,7 +1231,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.20.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1302,7 +1302,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.20.0:";; esac cat <<\_ACEOF @@ -1382,7 +1382,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.20.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1399,7 +1399,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.20.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2329,7 +2329,7 @@ # Define the identity of the package. PACKAGE='yast2-mail' - VERSION='2.21.1' + VERSION='2.20.0' cat >>confdefs.h <<_ACEOF @@ -2451,7 +2451,7 @@ -VERSION="2.21.1" +VERSION="2.20.0" RPMNAME="yast2-mail" MAINTAINER="Peter Varkoly <[email protected]>" @@ -3470,7 +3470,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.20.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3523,7 +3523,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.20.0 configured by $0, generated by GNU Autoconf 2.68, 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.1/configure.in --- old/yast2-mail-2.21.1/configure.in 2011-10-04 10:35:18.000000000 +0200 +++ new/yast2-mail-2.21.1/configure.in 2011-07-28 10:32:52.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-mail dnl -dnl -- This file is generated by y2autoconf 2.21.2 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.18.11 - 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.20.0, 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.20.0" RPMNAME="yast2-mail" MAINTAINER="Peter Varkoly <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/Mail.ycp new/yast2-mail-2.21.1/src/Mail.ycp --- old/yast2-mail-2.21.1/src/Mail.ycp 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/src/Mail.ycp 2011-10-26 09:33:42.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Martin Vidner <[email protected]> * - * $Id: Mail.ycp 63072 2011-01-04 11:19:49Z lslezak $ + * $Id: Mail.ycp 66587 2011-10-26 07:33:40Z varkoly $ * * Representation of the configuration of mail. * Input and output routines. @@ -79,14 +79,16 @@ /** * Use a virus scanner (AMaViS). * amavisd-new (mta-independent) must be installed. - * It will be installed if amavis_allowed and it is not installed. + * It will be installed if is not installed. */ global boolean use_amavis = false; /** - * Is amavis available on the installation media? + * Use a DKIM for outgoing email. + * If it is enabled AMaViS will be enabled too. */ - global boolean amavis_allowed = true; + global boolean use_dkim = false; + /** * Domains for locally delivered mail. @@ -169,6 +171,12 @@ */ boolean enable_smtp_auth = false; + /** + * Sysconfig setting which contains the email address which will + * be applied as sender for system mails + */ + global string system_mail_sender = ""; + /* ---------------------------------------------------------------- */ // constants @@ -440,11 +448,8 @@ } // amavis - string amavis_pkg = "amavisd-new"; - amavis_allowed = PackageSystem::Installed (amavis_pkg) || - Mode::commandline (); - // || PackageSystem::Available (amavis_pkg); - use_amavis = amavis_allowed && (SCR::Read (.sysconfig.amavis.USE_AMAVIS) == "yes"); + use_amavis = (SCR::Read (.sysconfig.amavis.USE_AMAVIS) == "yes"); + use_dkim = use_amavis && (SCR::Read (.sysconfig.amavis.USE_DKIM) == "yes"); // local_domains string ld_s = ""; @@ -668,8 +673,8 @@ create_config = true; listen_remote = true; connection_type = `dialup; - amavis_allowed = true; use_amavis = true; + use_dkim = true; // good example? local_domains = ["branch1.example.com", "branch2.example.com"]; outgoing_mail_server = "mail.example.com"; @@ -1096,7 +1101,7 @@ else if (mta == `postfix) { ret = (integer) - SCR::Execute(.target.bash, "/sbin/SuSEconfig --module postfix"); + SCR::Execute(.target.bash, "/usr/sbin/SuSEconfig.postfix"); } else { @@ -1129,6 +1134,10 @@ return false; } } + if (use_dkim) + { + SCR::Execute(.target.bash, "/usr/lib/YaST2/servers_non_y2/setup_dkim_verifying.pl"); + } } Service::Stop ("fetchmail"); @@ -1287,22 +1296,26 @@ }); mta = settings["mta"]: `other; - connection_type = settings["connection_type"]: `none; - listen_remote = settings["listen_remote"]: false; - use_amavis = settings["use_amavis"]: false; - local_domains = settings["local_domains"]: []; + connection_type = settings["connection_type"]: `none; + listen_remote = settings["listen_remote"]: false; + use_amavis = settings["use_amavis"]: false; + use_dkim = settings["use_dkim"]: false; + local_domains = settings["local_domains"]: []; outgoing_mail_server = settings["outgoing_mail_server"]: ""; - postfix_mda = settings["postfix_mda"]: `local; - from_header = settings["from_header"]: ""; + postfix_mda = settings["postfix_mda"]: `local; + from_header = settings["from_header"]: ""; masquerade_other_domains = settings["masquerade_other_domains"]: []; - masquerade_users = settings["masquerade_users"]: []; - fetchmail = settings["fetchmail"]: []; + masquerade_users = settings["masquerade_users"]: []; + fetchmail = settings["fetchmail"]: []; MailAliases::aliases = settings["aliases"]: []; MailAliases::FilterRootAlias (); -// MailAliases::merge_aliases = settings["merge_aliases"]: false; - virtual_users = settings["virtual_users"]: []; - smtp_use_TLS = settings["smtp_use_TLS"]: "yes"; - smtp_auth = settings["smtp_auth"]: []; + virtual_users = settings["virtual_users"]: []; + smtp_use_TLS = settings["smtp_use_TLS"]: "yes"; + smtp_auth = settings["smtp_auth"]: []; + system_mail_sender = settings["system_mail_sender"]:""; + if( use_dkim ) { + use_amavis = true; + } y2debug ("after %1", settings); // may contain passwords return true; } @@ -1319,6 +1332,7 @@ "connection_type": connection_type, "listen_remote": listen_remote, "use_amavis": use_amavis, + "use_dkim" : use_dkim, "local_domains": local_domains, "outgoing_mail_server": outgoing_mail_server, "from_header": from_header, @@ -1330,6 +1344,7 @@ "virtual_users": virtual_users, "smtp_auth": smtp_auth, "smtp_use_TLS": smtp_use_TLS, + "system_mail_sender":system_mail_sender, ]; if (mta == `postfix) { @@ -1434,18 +1449,13 @@ summary = summary + ListItem (_("Masquerade Users"), masquerade_users, "user"); // summary header summary = Summary::AddHeader(summary, _("Accept remote SMTP connections")); - summary = Summary::AddLine(summary, (listen_remote) ? - // summary item - _("Yes") : - // summary item - _("No")); + summary = Summary::AddLine(summary, (listen_remote) ? _("Yes") : _("No")); // summary header summary = Summary::AddHeader(summary, _("Use AMaViS")); - summary = Summary::AddLine(summary, (use_amavis) ? - // summary item - _("Yes") : - // summary item - _("No")); + summary = Summary::AddLine(summary, (use_amavis) ? _("Yes") : _("No")); + // summary header + summary = Summary::AddHeader(summary, _("Use DKIM")); + summary = Summary::AddLine(summary, (use_dkim) ? _("Yes") : _("No")); // summary item summary = summary + ListItem (_("Fetchmail"), fetchmail, "server"); // summary item diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/mail-server_dialogs.ycp new/yast2-mail-2.21.1/src/mail-server_dialogs.ycp --- old/yast2-mail-2.21.1/src/mail-server_dialogs.ycp 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/src/mail-server_dialogs.ycp 2011-10-26 09:30:57.000000000 +0200 @@ -40,7 +40,6 @@ boolean ldap_server_local = false; string comment = ""; Ldap::Read(); - Ldap::LDAPInit(); map<string, any> LDAPSettings = (map <string, any>) Ldap::Export(); list args = []; integer size1 = (integer)SCR::Read(.target.size, "/etc/ssl/servercerts/servercert.pem"); @@ -140,6 +139,11 @@ //write the settings: Ldap::Write(abort_block); } + else + { + Ldap::LDAPInit(); + } + MailServer::AdminPassword = Ldap::LDAPAskAndBind(false); if( MailServer::AdminPassword != nil ) { @@ -1373,7 +1377,7 @@ { SMT = "NONE"; } - MailServer::GlobalSettings["SendingMail","Type"] = UI::QueryWidget(`id(`SendingMailType), `CurrentButton); + MailServer::GlobalSettings["SendingMail","Type"] = SMT; MailServer::GlobalSettings["SendingMail","TLS"] = UI::QueryWidget(`id(`SendingMailTLS), `CurrentButton); MailServer::GlobalSettings["SendingMail","RelayHost","Name"] = ""; MailServer::GlobalSettings["SendingMail","RelayHost","Auth"] = "0"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/mail.ycp new/yast2-mail-2.21.1/src/mail.ycp --- old/yast2-mail-2.21.1/src/mail.ycp 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/src/mail.ycp 2011-10-26 09:33:42.000000000 +0200 @@ -12,12 +12,22 @@ * Peter Varkoly <[email protected]> * Martin Vidner <[email protected]> * - * $Id: mail.ycp 66159 2011-09-29 10:48:16Z visnov $ + * $Id: mail.ycp 66587 2011-10-26 07:33:40Z varkoly $ * * Main file for mail configuration. Uses all other files. * */ +/** + * @param flag "<b>permanent</b>", "<b>dialup</b>", or "<b>screenshots</b>"<br> + * <dl> + * <dt>permanent<dd>preselects permanent connnection + * <dt>dialup<dd>preselects dial-up connnection + * <dt>screenshots + * <dd>uses faked data (see Mail::Fake), enables running the module + * as non-root. (Uses Mode::screen_shot().) + * </dl> + */ { /*** * <h3>Configuration of the mail</h3> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/ui.ycp new/yast2-mail-2.21.1/src/ui.ycp --- old/yast2-mail-2.21.1/src/ui.ycp 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/src/ui.ycp 2011-10-26 09:33:42.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Martin Vidner <[email protected]> * - * $Id: ui.ycp 66159 2011-09-29 10:48:16Z visnov $ + * $Id: ui.ycp 66587 2011-10-26 07:33:40Z varkoly $ * * All user interface functions. * @@ -230,7 +230,8 @@ list widgets = []; - symbol ct = Mail::connection_type; + symbol ct = Mail::connection_type; + boolean ama = Mail::use_amavis; if (preselect_connection_type != nil) { ct = preselect_connection_type; @@ -248,33 +249,26 @@ // Translators: radio button label `RadioButton (`id (`permanent), `opt (`notify), _("&Permanent"), ct == `permanent), // Translators: radio button label - `RadioButton (`id (`dialup), `opt (`notify), _("&Dial-up"), ct == `dialup), + `RadioButton (`id (`dialup), `opt (`notify), _("&Dial-up"), ct == `dialup), // Translators: radio button label - `RadioButton (`id (`none), `opt (`notify), _("No &connection"), ct == `none), - // Translators: radio button label - `RadioButton (`id (`nodaemon), `opt (`notify), _("Do not start Postfix as Daemon"), ct == `nodaemon), + `RadioButton (`id (`none), `opt (`notify), _("No &connection"), ct == `none), + // Translators: radio button label + `RadioButton (`id (`nodaemon), `opt (`notify), _("Do not start Postfix as Daemon"), ct == `nodaemon), ] ) ); - boolean amavis_allowed = Mail::amavis_allowed; - - term amavis_t = nil; - if (amavis_allowed) - { - amavis_t = `Left (WJ_MakeWidget (`use_amavis)); - widgets = add (widgets, `use_amavis); - } - else - { - amavis_t = `Empty (`id (`use_amavis)); - } + term amavis_t = `Left (WJ_MakeWidget (`use_amavis)); + widgets = add (widgets, `use_amavis); + term dkim_t = `Left (WJ_MakeWidget (`use_dkim)); + widgets = add (widgets, `use_dkim); contents = `HSquash ( `VBox ( contents, `VSpacing (1), - amavis_t + amavis_t, + dkim_t ) ); @@ -286,25 +280,38 @@ any ret = nil; while (true) { - ct = (symbol) UI::QueryWidget (`id (`ctg), `CurrentButton); + ct = (symbol) UI::QueryWidget (`id (`ctg), `CurrentButton); if (ct == `permanent || ct == `dialup) { UI::ChangeWidget (`id (`use_amavis), `Enabled, true); + UI::ChangeWidget (`id (`use_dkim), `Enabled, true); Wizard::RestoreNextButton(); - //argh, slow - //Wizard::RestoreNextButton (); - } - else if (ct == `nodaemon) - { - UI::ChangeWidget (`id (`use_amavis), `Value, false); - UI::ChangeWidget (`id (`use_amavis), `Enabled, false); } + else if (ct == `nodaemon) + { + UI::ChangeWidget (`id (`use_amavis), `Value, false); + UI::ChangeWidget (`id (`use_amavis), `Enabled, false); + UI::ChangeWidget (`id (`use_dkim), `Value, false); + UI::ChangeWidget (`id (`use_dkim), `Enabled, false); + } else if (ct == `none) { UI::ChangeWidget (`id (`use_amavis), `Value, false); UI::ChangeWidget (`id (`use_amavis), `Enabled, false); + UI::ChangeWidget (`id (`use_dkim), `Value, false); + UI::ChangeWidget (`id (`use_dkim), `Enabled, false); Wizard::SetNextButton(`next, Label::FinishButton() ); } + ama = (boolean) UI::QueryWidget (`id (`use_amavis), `Value); + if(ama) + { + UI::ChangeWidget (`id (`use_dkim), `Enabled, true); + } + else + { + UI::ChangeWidget (`id (`use_dkim), `Value, false); + UI::ChangeWidget (`id (`use_dkim), `Enabled, false); + } ret = UI::UserInput (); if (ret == `cancel) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-mail-2.21.1/src/widgets.ycp new/yast2-mail-2.21.1/src/widgets.ycp --- old/yast2-mail-2.21.1/src/widgets.ycp 2011-10-04 10:34:51.000000000 +0200 +++ new/yast2-mail-2.21.1/src/widgets.ycp 2011-10-26 09:33:42.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Martin Vidner <[email protected]> * - * $Id: widgets.ycp 58152 2009-07-24 14:00:39Z varkoly $ + * $Id: widgets.ycp 66587 2011-10-26 07:33:40Z varkoly $ */ { @@ -356,6 +356,23 @@ Mail::use_amavis = am; } +/** + * @return a variable to be used by a widget + */ +define boolean Get_use_dkim () ``{ + return Mail::use_dkim; +} + +/** + * Set a variable acording to widget value + * @param id widget id + */ +define void Set_use_dkim (symbol id) ``{ + boolean dkim = (boolean) UI::QueryWidget (`id (id), `Value); + Mail::Touch (Mail::use_dkim != dkim); + Mail::use_dkim = dkim; +} + /** * @return a variable to be used by a widget @@ -715,12 +732,19 @@ "widget": `CheckBox (), // checkbox label "label": _("&Enable virus scanning (AMaViS)"), + // we need notify option to enable disable dkim + "opt" : `opt (`notify), // help text "help": _(" -<p>Enabling virus scanning checks incoming and outgoing mail +<p><b>Enabling virus scanning (AMaViS)</b> checks incoming and outgoing mail with AMaViS.</p> ") // help text ++ _("<p>Enabling AMaViS will also enable the following modules: </p> +<p><b>Spamassassin</b> SPAM scanner</p> +<p><b>DKIM</b> checks Domain Key signed incomming mails</p> +<p><b>Clamav</b> open source virus scanner engine</p>") + // help text + _(" <p>If AMaViS is not installed and you want to use it, it will be installed automatically.</p> @@ -728,6 +752,38 @@ "get": Get_use_amavis, "set": Set_use_amavis, ], + `use_dkim: $[ + "widget": `CheckBox (), + // checkbox label + "label": _("&Enable DKIM signing for outgoing mails."), + // help text + "help": _(" +<p><b>Enabling DKIM signig for outgoing mails.</b></p> +") + // help text ++ _(" +<p>Enabling DKIM for outgoing emails requires additional actions. A SSL key +will be generated for the 'mydomain'-value defined in postfix. A new service +'submission' will be configured in postfix. After this is set up you can send +email with this service 'submission' from 'mynetworks' with enabled SASL +authentication. Only the emails sent by this new service will be signed with +the domain key.</p> +") + + // help text + _(" +<p>The public key of the domain key needs to be offered by a Domain Name +Service. The public key will be saved as a DNS TXT record +into <b>/var/db/dkim/[mydomain].public.txt</b> and needs to be deployed to an +according Domain Name Service. If there is a name service +running on this server, which is the authoritative server for that domain the +public key will be added as a TXT record to that domain zone +automatically.</p> +") + + // help text + _("Enabling DKIM support the virus scanning (AMaViS) will be enabled too."), + "get": Get_use_dkim, + "set": Set_use_dkim, + ], `fm_server: $[ "widget": `TextEntry (), // Translators: text entry label -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
