Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package postfix for openSUSE:Factory checked in at 2021-07-17 23:36:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/postfix (Old) and /work/SRC/openSUSE:Factory/.postfix.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "postfix" Sat Jul 17 23:36:22 2021 rev:204 rq:906315 version:3.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/postfix/postfix.changes 2021-07-09 23:56:55.969647344 +0200 +++ /work/SRC/openSUSE:Factory/.postfix.new.2632/postfix.changes 2021-07-17 23:36:27.242055152 +0200 @@ -1,0 +2,12 @@ +Tue Jul 6 22:23:17 UTC 2021 - Christian Wittmer <ch...@computersalat.de> + +- postfix-SUSE + * rework sysconfig.postfix, add + - POSTFIX_WITH_DKIM + - POSTFIX_DKIM_CONN + * rework config.postfix for main.cf + - with_dkim +- update postfix-main.cf.patch + * add OpenDKIM settings + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ postfix.spec: same change ++++++ postfix-SUSE.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/postfix-SUSE/config.postfix new/postfix-SUSE/config.postfix --- old/postfix-SUSE/config.postfix 2021-06-24 00:22:12.589769519 +0200 +++ new/postfix-SUSE/config.postfix 2021-07-07 00:14:50.322245382 +0200 @@ -92,6 +92,31 @@ fi cd "$PF_CHROOT" + if [ "${POSTFIX_DKIM_CONN,,}" == 'socket' -a \ + "${POSTFIX_WITH_DKIM,,}" != 'no' ]; then + if [[ -f /etc/opendkim/opendkim.conf ]]; then + DKIM_SOCKET=$(awk -F':' '/^Socket(\s|\t)+local/ {print $2}' /etc/opendkim/opendkim + # support for old socket dir '/var/run' + if [[ "${DKIM_SOCKET}" =~ ^/var/run ]]; then + OLD_DKIM_SOCKET='true' + DKIM_SOCKET="${DKIM_SOCKET#/var}" + fi + if [[ -z "${DKIM_SOCKET}" ]]; then + warn_user "\topendkim is not running with 'Socket local:/run/opendkim/o +\tPlease set 'Socket' in '/etc/opendkim/opendkim.conf' as mentioned above." + exit 1 + else + DKIM_SOCKET_DIR=$(dirname ${DKIM_SOCKET}) + CHR_DKIM_SOCKET=${DKIM_SOCKET#/} + CHR_DKIM_SOCKET_DIR=$(dirname ${CHR_DKIM_SOCKET}) + fi + else + warn_user "\t/etc/opendkim/opendkim.conf does not exist!!\n\ +\tThis should not happen!\n\ +\tPlease check if opendkim is installed." + fi + fi + if [ "$(echo "$POSTFIX_MYSQL_CONN" | tr 'A-Z' 'a-z' )" == "socket" -a \ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "no" ]; then if [ -n "$(my_print_defaults mysqld)" ]; then @@ -129,13 +154,19 @@ if [ -d etc ]; then echo "removing postfix chroot environment..." fi + + if [[ -n "${CHR_DKIM_SOCKET_DIR}" ]]; then + if grep "${PF_CHROOT}"/${CHR_DKIM_SOCKET_DIR} /proc/mounts &> /dev/null; then + umount "${PF_CHROOT}"/${CHR_DKIM_SOCKET_DIR} + fi + fi if [ -n "$CHR_MYSQL_SOCKET_DIR" ]; then if grep "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then umount "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR fi fi - + if [ -n "$CHR_SASL_SOCKET_DIR" ]; then if grep "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR /proc/mounts &> /dev/null; then umount "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR @@ -150,6 +181,29 @@ cpifnewer /etc/openldap/ldap.conf etc/openldap fi + if [[ "${POSTFIX_WITH_DKIM,,}" != "yes" ]]; then + if [[ -n "${CHR_DKIM_SOCKET_DIR}" ]]; then + if grep "${PF_CHROOT}"/${CHR_DKIM_SOCKET_DIR} /proc/mounts &> /dev/null; then + umount "${PF_CHROOT}"/${CHR_DKIM_SOCKET_DIR} + fi + fi + fi + + if [ "${POSTFIX_DKIM_CONN,,}" == "socket" -a \ + "${POSTFIX_WITH_DKIM,,}" != "no" ]; then + if [[ ! -d ${CHR_DKIM_SOCKET_DIR} ]]; then + mkdir -p ${CHR_DKIM_SOCKET_DIR} + fi + # support for old socket dir '/var/run' + if [[ "${OLD_DKIM_SOCKET}" == 'true' ]]; then + [[ ! -d var ]] && mkdir var + ln -s ../run var/run + fi + if ! grep ${CHR_DKIM_SOCKET_DIR} /proc/mounts &> /dev/null; then + mount -o bind ${DKIM_SOCKET_DIR} "${PF_CHROOT}"/${CHR_DKIM_SOCKET_DIR} + fi + fi + if [ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "yes" ]; then if [ -n "$CHR_MYSQL_SOCKET_DIR" ]; then if grep "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then @@ -257,6 +311,8 @@ TMPDIR=$(mktemp -d /tmp/config.postfix.XXXXXX) || exit 1 PCONF="/usr/sbin/postconf -c $TMPDIR" + # needed when for WITH_DKIM + export POSTFIX_WITH_DKIM # needed when for WITH_LDAP export POSTFIX_WITH_LDAP # needed when for WITH_MYSQL @@ -731,6 +787,11 @@ my $mncf = "$ENV{MCF_DIR}/main.cf"; my $line; +my $with_dkim = + defined $ENV{POSTFIX_WITH_DKIM} ? $ENV{POSTFIX_WITH_DKIM} : "no"; + +$with_dkim = lc($with_dkim); + my $with_ldap = defined $ENV{POSTFIX_WITH_LDAP} ? $ENV{POSTFIX_WITH_LDAP} : "no"; @@ -757,7 +818,31 @@ while( <MNCF> ) { chomp; - if( /\#?(virtual_alias_maps\s=\s).*/ ) { + if( /^\#?(smtpd_milters\s=.*)/ ) { + if ($with_dkim ne "yes") { + $line = "#".$1; + } else { + $line = $1; + } + } elsif( /^\#?(non_smtpd_milters\s=.*)/ ) { + if ($with_dkim ne "yes") { + $line = "#".$1; + } else { + $line = $1; + } + } elsif( /^\#?(milter_default_action\s=.*)/ ) { + if ($with_dkim ne "yes") { + $line = "#".$1; + } else { + $line = $1; + } + } elsif( /^\#?(milter_protocol\s=.*)/ ) { + if ($with_dkim ne "yes") { + $line = "#".$1; + } else { + $line = $1; + } + } elsif( /\#?(virtual_alias_maps\s=\s).*/ ) { if ($with_mysql ne "yes" && $with_ldap ne "yes") { $line = $1."$def_db_type:/etc/postfix/virtual"; } elsif ($with_ldap eq "yes" && $with_mysql ne "yes") { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/postfix-SUSE/sysconfig.postfix new/postfix-SUSE/sysconfig.postfix --- old/postfix-SUSE/sysconfig.postfix 2021-06-24 00:14:22.166810833 +0200 +++ new/postfix-SUSE/sysconfig.postfix 2021-07-07 00:17:13.277935055 +0200 @@ -125,6 +125,28 @@ ## Default: no ## Config: postfix # +# Set this to yes, if /usr/sbin/config.postfix should activate DKIM stuff in main.cf +# and having 'opendkim.sock' inside chroot jail +# Note: When POSTFIX_CHROOT="yes" then 'opendkim.sock' will be available +# in postfix CHROOT +# +POSTFIX_WITH_DKIM="no" + +## Type: string(socket,tcp) +## Default: "socket" +## Config: postfix +# +# Set this to "tcp", if your DKIM is not on localhost +# Note: When POSTFIX_CHROOT="yes" then DKIM_SOCKET will also be available +# in postfix chroot, but you can use "tcp" just as well with DKIM +# on localhost +# +POSTFIX_DKIM_CONN="socket" + +## Type: yesno +## Default: no +## Config: postfix +# # Set this to yes, if /usr/sbin/config.postfix should activate ldap stuff in main.cf # This extends virtual_alias_maps with "ldap:/etc/postfix/ldap_aliases.cf" # ++++++ postfix-main.cf.patch ++++++ --- /var/tmp/diff_new_pack.QqYcnW/_old 2021-07-17 23:36:28.018049170 +0200 +++ /var/tmp/diff_new_pack.QqYcnW/_new 2021-07-17 23:36:28.018049170 +0200 @@ -50,7 +50,7 @@ # PARALLEL DELIVERY TO THE SAME DESTINATION # -@@ -673,4 +674,141 @@ sample_directory = +@@ -673,4 +674,148 @@ sample_directory = # readme_directory: The location of the Postfix README files. # readme_directory = @@ -151,6 +151,13 @@ +smtpd_tls_exclude_ciphers = RC4 +smtpd_tls_received_header = no +############################################################ ++# OpenDKIM ++############################################################ ++#smtpd_milters = unix:/run/opendkim/opendkim.sock ++#non_smtpd_milters = $smtpd_milters ++#milter_default_action = accept ++#milter_protocol = 2 ++############################################################ +# Start MySQL from postfixwiki.org +############################################################ +relay_domains = $mydestination, lmdb:/etc/postfix/relay