diff --git a/indimail-mta-x/BIN.in b/indimail-mta-x/BIN.in index 7c85a870c..9a21aed4e 100644 --- a/indimail-mta-x/BIN.in +++ b/indimail-mta-x/BIN.in @@ -35,7 +35,6 @@ f:::0755:/bin/:autoresponder:autoresponder f:::0755:/bin/:qnotify:qnotify f:::0755:/bin/:rrt:rrt f:::0755:/bin/:qarf:qarf -f:::0755:/bin/:dk-filter:dk-filter f:::0755:/bin/:queue-fix:queue-fix f:::0755:/bin/:uacl:uacl f:::0755:/bin/:qbase64:qbase64 diff --git a/indimail-mta-x/MAN.in b/indimail-mta-x/MAN.in index 12affcd32..65b0582c1 100644 --- a/indimail-mta-x/MAN.in +++ b/indimail-mta-x/MAN.in @@ -151,7 +151,6 @@ f:::0644:/man7/:indimail-mta-internals.7:indimail-mta-internals.7 f:::0644:/man8/:cdb-database.8:cdb-database.8 f:::0644:/man8/:cleanq.8:cleanq.8 f:::0644:/man8/:ctrlenv.8:ctrlenv.8 -f:::0644:/man8/:dk-filter.8:dk-filter.8 f:::0644:/man8/:dknewkey.8:dknewkey.8 f:::0644:/man8/:greydaemon.8:greydaemon.8 f:::0644:/man8/:ipmeprint.8:ipmeprint.8 diff --git a/indimail-mta-x/Makefile b/indimail-mta-x/Makefile index 3db263ae4..2e5d8bc41 100644 --- a/indimail-mta-x/Makefile +++ b/indimail-mta-x/Makefile @@ -26,7 +26,7 @@ it = 822date 822field 822header 822print 822received addrlist analyzer \ binm3 binm3+df bouncesaying cdb-database cdbdump cdbget cdbgetm \ cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest cidr condredirect \ config-fast create_services indimail-mta.cron ctrlenv datemail \ - dk-filter dknewkey dnsblcheck dnscname dnsfq dnsip dnsmxip dnsptr \ + dknewkey dnsblcheck dnscname dnsfq dnsip dnsmxip dnsptr \ dnstlsarr dnstxt dot-forward drate etrn except fastforward \ favicon.base64 filterit forward generic.so greydaemon home home+df \ hostname iftocc indimail-mta.changes setqload qmonitor \ @@ -54,7 +54,7 @@ it = 822date 822field 822header 822print 822received addrlist analyzer \ yearcal man = cdb-database.8 cdbdump.1 cdbget.1 cdbgetm.1 cdbmake.1 cleanq.8 \ - condredirect.1 ctrlenv.8 datemail.1 dk-filter.8 dknewkey.8 \ + condredirect.1 ctrlenv.8 datemail.1 dknewkey.8 \ dot-forward.1 dot-qmail.5 drate.1 drate.1 fastforward.1 filterto.1 \ indimail-env.7 filterit.1 forward.1 maildirserial.1 mlmatchup.8 \ multi-queue.7 new-inject.1 plugin_init.3 plugtest.1 predate.1 \ @@ -1513,12 +1513,6 @@ qmail-dkim.8: qmail-dkim.9 conf-prefix conf-sysconfdir | sed s}@controldir\@}"`head -1 conf-sysconfdir`/control"}g \ > qmail-dkim.8 -dk-filter.8: dk-filter.9 conf-prefix conf-sysconfdir - cat dk-filter.9 \ - | sed s}PREFIX}"`head -1 conf-prefix`"}g \ - | sed s}@controldir\@}"`head -1 conf-sysconfdir`/control"}g \ - > dk-filter.8 - pidopen.o: \ compile pidopen.h pidopen.c ./compile pidopen.c @@ -2973,15 +2967,6 @@ warn-auto.sh zspam.sh conf-libexec > zspam chmod +x $@ -dk-filter: \ -warn-auto.sh dk-filter.sh conf-prefix conf-sysconfdir - cat warn-auto.sh dk-filter.sh \ - | sed s}SYSCONFDIR}"`head -1 conf-sysconfdir`"}g \ - | sed s}PREFIX}"`head -1 conf-prefix`"}g \ - | sed s}@controldir\@}"`head -1 conf-sysconfdir`/control"}g \ - > dk-filter - chmod +x $@ - senders: \ warn-auto.sh senders.sh conf-qmail cat warn-auto.sh senders.sh \ diff --git a/indimail-mta-x/TARGETS b/indimail-mta-x/TARGETS index 724f64d46..ca9418774 100644 --- a/indimail-mta-x/TARGETS +++ b/indimail-mta-x/TARGETS @@ -146,8 +146,6 @@ datemail.1 ddist deferrals delivery_rate.o -dk-filter -dk-filter.8 dkim.lib dknewkey dknewkey.8 diff --git a/indimail-mta-x/dk-filter.9 b/indimail-mta-x/dk-filter.9 deleted file mode 100644 index f4ac275e1..000000000 --- a/indimail-mta-x/dk-filter.9 +++ /dev/null @@ -1,128 +0,0 @@ -.\" vim: tw=75 -.TH dk-filter 8 - -.SH NAME -dk-filter \- sign/verify using DKIM (SSP/ADSP optionally) and deliver a -mail message for delivery - -.SH SYNOPSIS -\fBFILTERARGS=QMAILHOME/bin/dk-filter\fR - -.SH DESCRIPTION -\fBdk-filter\fR is a script which can be set as a filter for -\fBspawn-filter\fR(8) or \fBqmail-qfilter\fR(1). The filter can be set for -\fBspawn-filter\fR(8) either as \fBFILTERARGS\fR or in the control file -\fIfilterargs\fR. The environment variable \fBFILTERARGS\fR takes -precendence over \fIfilterargs\fR control file. - -\fBdk-filter\fR supports DKIM signing and verification and can -optionally use \fBSender Signing Practice (SSP)\fR or \fBAuthor Domain -Signing Practice\fR. It uses the libdkim2 and OpenSSL libraries. To sign a -message, set the \fBDKIMSIGN\fR environment variable to the pathname of the -private key that will be used to sign the message. If there is a % -character in the environment variable, it is removed and replaced by the -domain name in the Return-Path, Sender, X-Bounced-Adress or From: header, -whichever is found first. If, after substituting the %, that file does not -exist, \fI@controldir@/domainkeys/%/default\fR will be used as the key. If -again, after substituting the % sign, the file does not exist, -\fI@controldir@/domainkeys/default\fR will be used as the key. After all -substitutions, if the key file does not exist, the message will not be -signed. If there is no % and the file does not exist, the message will be -rejected with error 35. The default private key -\fI@controldir@/domainkeys/default\fR can be overriden by the -\fBDKIM_DEFAULT_KEY\fR environment variable. - -The selector (s=) will be taken from the basename of the file. The private -key should be created by \fBdknewkey\fR(8) with RSA or ED25519 encryption -method. - -You can set various DKIM options in getopt style, by setting the -environment variable \fBDKIMSIGNOPTIONS\fR. - -.nf -c r for relaxed [DEFAULT], s - simple, - t relaxed/simple, u - simple/relaxed -l include body length tag -q include query method tag; -t include a timestamp tag -h include copied headers. This adds the z= tag - containing a copy of the message's original - headers. -i the identity, if not provided it will not be included -x the expire time in seconds since epoch - ( DEFAULT = current time + 604800) - if set to - then it will not be included -z 1 for sha1, 2 for sha256, 3 for both -s -y -.fi - -.EX -DKIMSIGNOPTIONS="-c r -q" -sets relaxed canonicalization and include query method tag -.EE - -When signing \fBdk-filter\fR uses the domain found in the Return-Path, -Sender, From, X-Bounced-Address headers to set the domain tag. If none of -these are present, it uses the value of \fBBOUNCEDOMAIN\fR environment -variable. \fBBOUNCEDOMAIN\fR can be set to an email address or a domain -(without the at sign). You can force \fBdk-filter\fR to use the domain -found in the sender by setting \fBUSE_SENDER\fR environment variable. The -sender is present as \fB_SENDER\fR environment variable set by -\fBspawn-filter\fR(8). - -In addition to \fBDKIMSIGN\fR environment variable, you can have the domain -and the corresponding pathname of the private key in the control file -\fIdkimkeys\fR which has the following format - -.EX -domain:private_key_path:envstr -.EE - -.fi -Here \fIenvstr\fR is a string of environment variable additions or -removals. e.g. - -.EX -QREGEX=1,DKIMSIGNOPTIONS=-z 4 -.EX - -.fi -If an entry for \fIdomain\fR exists in \fIdkimkeys\fR, the value of -\fBDKIMSIGN\fR environment variable is ignored. You can disable -\fIdkimkeys\fR by setting \fBNODKIMKEYS\fR environment variable. - -To verify a message, set the \fBDKIMVERIFY\fR environment variable. -\fBdk-filter\fR always inserts the \fBDKIM-Status\fR header, so that -messages can be rejected later at delivery time, or in the mail reader. In -that case you may set \fBDKIMVERIFY\fR to an empty string. The exit code of -\fBdk-filter\fR can be fine tuned by setting \fBDKIMVERIFY\fR environment -variable. See \fBdkim\fR(8) for a detailed description on setting the -\fBDKIMVERIFY\fR environment variable. - -\fBdk-filter\fR does not use any signing practice by default. You can -override this by setting the SIGN_PRACTICE to ssp or adsp (lowercase). - -If neither of the environment variables DKIMSIGN, DKIMVERIFY are defined, -dk-filter will do signing by default. - -You can set environment variable NODKIM environment variable to disable -DKIM signing and verification, but why would you do that? - -\fBdk-filter\fR can insert an additional \fBDKIM-signature\fR if -\fBDKIMSIGNEXTRA\fR is set. This is useful for inserting both RSA and -ED25519 signature when signing. As an example you can have \fBDKIMSIGN\fR -pointing to a RSA private key, \fBDKIMSIGNOPTIONS\fR set as "-z 2" along -with other options if any. Additionally set \fBDKIMSIGNEXTRA\fR pointing to -an ed25519 private key and set \fBDKIMSIGNOPTIONSEXTRA\fR as "-z 4" along -with other options if any. - -.SH "EXIT CODES" -0 for success, non-zero failure - -.SH "SEE ALSO" -qmail-qfilter(1), -dknewkey(8), -dkim(8), -qmail-dkim(8), -spawn-filter(8) diff --git a/indimail-mta-x/dk-filter.sh b/indimail-mta-x/dk-filter.sh deleted file mode 100644 index 949167b14..000000000 --- a/indimail-mta-x/dk-filter.sh +++ /dev/null @@ -1,471 +0,0 @@ -# -# $Id: dk-filter.sh,v 1.41 2024-01-06 21:32:38+05:30 Cprogrammer Exp mbhangui $ -# -get_dkimkeys() -{ - domain=$1 - if [ ! -f $CONTROLDIR/dkimkeys ] ; then - return 0 - fi - ( - awk -F: '{print $1" "$2" "$3}' $CONTROLDIR/dkimkeys | while read line - do - set $line - echo $domain | grep -E "$1" >/dev/null - if [ $? -eq 0 ] ; then - echo $2 - shift 2 - if [ $# -gt 0 ] ; then - echo "$*" | tr , \\n | while read "line" - do - var=$(echo $line | cut -d= -f1) - val=$(echo $line | cut -d= -f2-) - if [ -n "$val" ] ; then - echo "export $var=\"$val\"" 1>&3 - else - unset $var - fi - done - fi - break - fi - done - ) -} - -# -# replace % with domain in private key filename -# sets keyfn -# -replace_percent() -{ - percent_found=0 - echo $1|grep "%" >/dev/null 2>&1 - if [ $? -eq 0 ] ; then - percent_found=1 - fi - if [ $percent_found -eq 1 ] ; then - if [ -n "$BOUNCEDOMAIN" -a -z "$_SENDER" ] ; then - keyfn=$(echo $1 | sed "s{%{$BOUNCEDOMAIN{g") - if [ ! -f $keyfn ] ; then # remove % and check if file exists - t=$(echo $1 | sed "s{/%{{g") - if [ -f $t ] ; then - keyfn=$t - fi - fi - elif [ -n " $_SENDER" ] ; then - # replace '%' in filename with domain - domain=$(echo $_SENDER | cut -d@ -f2) - keyfn=$(echo $1 | sed "s{%{$domain{g") - if [ ! -f $keyfn ] ; then # remove % and check if file exists - t=$(echo $1 | sed "s{/%{{g") - if [ -f $t ] ; then - keyfn=$t - fi - fi - else - keyfn=$1 - fi - else - keyfn=$1 - fi -} - -dkim_setoptions() -{ - # DKIMSIGNOPTIONS="-z 1 -x - -y $dkimselector -s $dkimkeyfn" - set -- $(getopt lqthb:c:d:i:x:z:y:s: "$1") - xopt=0 - zopt=0 - yopt=0 - sopt=0 - dkimopts="$prefix/bin/dkim" - if [ -n "$BOUNCEDOMAIN" -a -z "$_SENDER" ] ; then - dkimopts="$dkimopts -d $BOUNCEDOMAIN" - fi - if [ -n "$USE_SENDER" -a -n "$_SENDER" ] ; then - domain=$(echo $_SENDER | cut -d@ -f2) - dkimopts="$dkimopts -d $domain" - fi - while [ $1 != -- ] - do - case $1 in - -l) - dkimopts="$dkimopts -l" - ;; - -q) - dkimopts="$dkimopts -q" - ;; - -t) - dkimopts="$dkimopts -t" - ;; - -h) - dkimopts="$dkimopts -h" - ;; - - -b) - dkimopts="$dkimopts -b $2" - shift - ;; - - -c) - dkimopts="$dkimopts -c $2" - shift - ;; - - -d) - dkimopts="$dkimopts -d $2" - shift - ;; - - -i) - dkimopts="$dkimopts -i $2" - shift - ;; - - -x) - xopt=1 - dkimopts="$dkimopts -x $2" - shift - ;; - - -z) - zopt=1 - dkimopts="$dkimopts -z $2" - shift - ;; - - -y) - yopt=1 - dkimopts="$dkimopts -y $2" - shift - ;; - - -s) - sopt=1 - dkimopts="$dkimopts -s $2" - shift - ;; - esac - shift # next flag - done - if [ $zopt -eq 0 ] ; then - dkimopts="$dkimopts -z 2" - fi - if [ $xopt -eq 0 ] ; then - dkimopts="$dkimopts -x -" - fi - if [ $yopt -eq 0 ] ; then - dkimopts="$dkimopts -y $dkimselector" - fi - if [ $sopt -eq 0 ] ; then - dkimopts="$dkimopts -s $dkimkeyfn" - fi -} - -# -# sets keyfn, selector -# -set_selector() -{ - if [ -z "$1" -o -z "$2" ] ; then - return 1 - fi - replace_percent $2 - case $1 in - "dkim") - dkimkeyfn=$keyfn - # dkimsign is first set by get_dkimfn - if [ $dkimsign -eq 2 -a ! -f $dkimkeyfn ] ; then - dkimkeyfn=$default_key - fi - if [ ! -f $dkimkeyfn ] ; then - dkimsign=0 - if [ $percent_found -eq 0 ] ; then - echo "private key does not exist" 1>&2 - /bin/rm -f $tmpfn - exit $priv_key_err # private key does not exist - else - dkimsign=1 - fi - else - dkimsign=1 - fi - dkimselector=$(basename $dkimkeyfn) - ;; - esac -} - -# -# uses dkimkeys to set DKIMSIGN. Overrides original DKIMSIGN -# -get_dkimfn() -{ -# set private key for dk / dkim signing -if [ -z "$DKIMVERIFY" ] ; then - # set DKIMSIGN from dkimkeys - if [ -z "$NODKIMKEYS" -a -f $CONTROLDIR/dkimkeys ] ; then - domain=$(echo $_SENDER | cut -d@ -f2) - t=$(get_dkimkeys $domain) - if [ -n "$t" ] ; then - DKIMSIGN=$t - fi - fi - if [ -z "$DKIMSIGN" ] ; then - DKIMSIGN=$CONTROLDIR/domainkeys/%/default - dkimsign=2 # key, selector selected as control/domainkeys/defaut - elif [ " $DKIMSIGN" = " $CONTROLDIR/domainkeys/%/default" ] ; then - dkimsign=2 # key, selector selected as control/domainkeys/defaut - fi -fi -} - -if [ -z "$QMAILREMOTE" -a -z "$QMAILLOCAL" ]; then - echo "dk-filter should be run by spawn-filter" 1>&2 - exit 1 -fi -dkimsign=0 -dkimverify=0 -prefix=PREFIX - -if [ "$prefix" = "/usr" ] ; then - priv_key_err=35 # indimail -else - priv_key_err=32 # netqmail, notqmail - if [ -z "$BOUNCEDOMAIN" -a -n "$DKIMDOMAIN" ] ; then - BOUNCEDOMAIN=$DKIMDOMAIN - fi -fi -if [ " $CONTROLDIR" = " " ] ; then - CONTROLDIR=@controldir@ -fi -if [ -n "$NODKIM" ] ; then - exec /bin/cat -fi - -if [ ! -f $prefix/bin/dkim ] ; then - echo "$prefix/bin/dkim: No such file or directory" 1>&2 - exit 1 -fi - -if [ -z "$DEFAULT_DKIM_KEY" ] ; then - default_key=$CONTROLDIR/domainkeys/default -else - default_key=$DEFAULT_DKIM_KEY -fi -slash=$(echo $CONTROLDIR | cut -c1) -if [ " $slash" != " /" ] ; then - cd SYSCONFDIR -fi - -if [ -n "$DKIMVERIFY" ] ; then - dkimverify=1 -else - envfn=$(mktemp -t envfilterXXXXXX) - exec 3>$envfn - get_dkimfn - . $envfn - /bin/rm -f $envfn -fi -tmpfn=$(mktemp -t dk-filterXXXXXX) -/bin/cat > $tmpfn -if [ -n "$DKIMSIGN" ] ; then - set_selector "dkim" "$DKIMSIGN" - if [ -n "$dkimkeyfn" -a -f "$dkimkeyfn" ] ; then - dkim_setoptions "$DKIMSIGNOPTIONS" - exec 0<$tmpfn - eval $dkimopts - if [ $? -ne 0 ] ; then - /bin/rm -f $tmpfn - echo "$prefix/bin/dkim failed" 1>&2 - exit 1 - fi - fi - if [ -n "$DKIMSIGNEXTRA" ] ; then - set_selector "dkim" "$DKIMSIGNEXTRA" - dkim_setoptions "$DKIMSIGNOPTIONSEXTRA" - if [ -n "$dkimkeyfn" -a -f "$dkimkeyfn" ] ; then - exec 0<$tmpfn - eval $dkimopts - if [ $? -ne 0 ] ; then - /bin/rm -f $tmpfn - echo "$prefix/bin/dkim failed" 1>&2 - exit 1 - fi - fi - fi -fi -if [ $dkimverify -eq 1 ] ; then - practice=$SIGN_PRACTICE - if [ " $practice" = " " ] ; then - practice=0 - elif [ " $practice" = " ssp" ] ; then - practice=1 - elif [ " $practice" = " adsp" ] ; then - practice=2 - fi - exec 0<$tmpfn - dkimvargs="-p $practice" - if [ -n "$UNSIGNED_SUBJECT" ] ; then - dkimvargs="$dkimvargs -S" - fi - if [ -n "$UNSIGNED_FROM" ] ; then - dkimvargs="$dkimvargs -f" - fi - if [ -n "$VERBOSE" ] ; then - dkimvargs="$dkimvargs -V" - fi - if [ -n "$SELECTOR_DATA" ] ; then - $prefix/bin/dkim $dkimvargs -v -T "$SELECTOR_DATA" - else - $prefix/bin/dkim $dkimvargs -v - fi - ret=$? - case $ret in - 14) # permanent error - /bin/rm -f $tmpfn - exit 100 - ;; - 88) # temporary error - /bin/rm -f $tmpfn - exit 111 - ;; - esac - if [ $ret -lt 0 ] ; then - echo "$prefix/bin/dkim failed" 1>&2 - /bin/rm -f $tmpfn - exit 1 - fi -fi -exec 0<$tmpfn -/bin/rm -f $tmpfn -/bin/cat -exit $? -# -# $Log: dk-filter.sh,v $ -# Revision 1.41 2024-01-06 21:32:38+05:30 Cprogrammer -# use _SENDER for d= tag if USE_SENDER is set -# -# Revision 1.40 2024-01-05 00:36:08+05:30 Cprogrammer -# fix BOUNCEDOMAIN getting unset -# use dkim -d bouncedomain for bounces -# -# Revision 1.39 2023-09-05 20:59:16+05:30 Cprogrammer -# Added missing NODKIMKEY feature to turn off dkimkeyfn -# -# Revision 1.38 2023-02-20 20:22:35+05:30 Cprogrammer -# unset variables for var=val when val is not set -# -# Revision 1.37 2023-02-17 20:17:51+05:30 Cprogrammer -# set environment variables from dkimkeys -# -# Revision 1.36 2023-02-13 10:07:28+05:30 Cprogrammer -# removed yahoo domainkeys -# -# Revision 1.35 2023-02-12 18:17:21+05:30 Cprogrammer -# use VERBOSE variable to turn on debug for signature verification status on fd 2 -# -# Revision 1.34 2023-02-05 20:59:55+05:30 Cprogrammer -# fixed temp files not removed for private key not found -# -# Revision 1.33 2023-02-02 17:30:12+05:30 Cprogrammer -# refactored for multi-signature generation -# -# Revision 1.32 2023-01-26 22:26:01+05:30 Cprogrammer -# removed setting redundant -b option -# -# Revision 1.31 2022-11-09 20:15:17+05:30 Cprogrammer -# replaced deprecated egrep with grep -E -# -# Revision 1.30 2022-10-02 22:15:23+05:30 Cprogrammer -# don't treat missng private key as error when DKIMSIGN has % -# -# Revision 1.29 2022-09-28 15:26:32+05:30 Cprogrammer -# remove '%' from filename if dkim key file not found -# -# Revision 1.28 2021-08-28 23:15:40+05:30 Cprogrammer -# control file dkimkeys for domain specific private key, selector -# -# Revision 1.27 2020-07-30 11:29:04+05:30 Cprogrammer -# Use BOUNCEDOMAIN only for bounces -# -# Revision 1.26 2020-04-11 08:41:50+05:30 Cprogrammer -# renamed DKIMDOMAIN to BOUNCEDOMAIN -# -# Revision 1.25 2020-04-09 22:25:01+05:30 Cprogrammer -# exec cat if both NODDK and NODKIM are defined -# -# Revision 1.24 2020-04-09 21:42:09+05:30 Cprogrammer -# added variables NODK, NODKIM to disable domainkeys, dkim -# -# Revision 1.23 2019-06-26 18:39:43+05:30 Cprogrammer -# use DEFAULT_DKIM_KEY env variable for default signing key -# -# Revision 1.22 2019-06-24 23:19:57+05:30 Cprogrammer -# added code for -d option in DKIMSIGNOPTIONS -# -# Revision 1.21 2019-01-14 00:10:00+05:30 Cprogrammer -# added -S, -f option to verify signatures with unsigned subject, unsigned from -# -# Revision 1.20 2017-03-09 16:38:15+05:30 Cprogrammer -# FHS changes -# -# Revision 1.19 2016-05-17 23:11:42+05:30 Cprogrammer -# fix for configurable control directory -# -# Revision 1.18 2014-03-12 08:50:48+05:30 Cprogrammer -# bug - fixed signing when env variables DKSIGN or DKIMSIGN were set -# -# Revision 1.17 2013-09-03 23:04:30+05:30 Cprogrammer -# set signing as default if both DKSIGN and DKIMSIGN are not defined -# -# Revision 1.16 2013-08-17 15:59:21+05:30 Cprogrammer -# do not treat duplicate DomainKey-Signature as an error -# -# Revision 1.15 2013-08-17 15:02:06+05:30 Cprogrammer -# fixed syntax errors and private key lookup -# -# Revision 1.14 2011-02-10 22:47:01+05:30 Cprogrammer -# fixed exit code of dk-filter when doing verification -# -# Revision 1.13 2011-02-08 22:02:29+05:30 Cprogrammer -# use sender domain when replacing '%' in private key -# -# Revision 1.12 2010-05-04 08:37:42+05:30 Cprogrammer -# do DK signing before DKIM signing to prevent DK_SYNTAX error -# -# Revision 1.11 2009-12-10 19:25:13+05:30 Cprogrammer -# added RCS id -# -# Revision 1.10 2009-12-10 16:41:14+05:30 Cprogrammer -# continue of message gives DK_SYNTAX_ERR -# -# Revision 1.9 2009-05-04 10:30:32+05:30 Cprogrammer -# fixed argument expected error -# -# Revision 1.8 2009-04-21 20:42:44+05:30 Cprogrammer -# added check for dktest, dkim executables -# -# Revision 1.7 2009-04-20 10:06:58+05:30 Cprogrammer -# added DKSIGNOPTS -# -# Revision 1.6 2009-04-19 13:38:24+05:30 Cprogrammer -# added full set of dkim options -# replaced indimail/bin/echo with echo 1>&2 -# -# Revision 1.5 2009-04-06 16:37:50+05:30 Cprogrammer -# added SIGN_PRACTICE -# use ietf standard insted of allman so that Yahoo verification does not fail -# -# Revision 1.4 2009-04-03 14:39:00+05:30 Cprogrammer -# added return status -# -# Revision 1.3 2009-04-03 08:55:29+05:30 Cprogrammer -# print error messages to stderr -# -# Revision 1.2 2009-04-02 20:36:25+05:30 Cprogrammer -# added -h option to dktest -# added -x - option to dkim -# -# Revision 1.1 2009-04-02 14:52:27+05:30 Cprogrammer -# Initial revision diff --git a/indimail-mta-x/doc/ChangeLog b/indimail-mta-x/doc/ChangeLog index 731bd68a1..0e6e5531a 100644 --- a/indimail-mta-x/doc/ChangeLog +++ b/indimail-mta-x/doc/ChangeLog @@ -172,8 +172,11 @@ Release 3.0.6-1.1 Start 25/10/2023 End 01/01/2024 RELAYCLIENT_NOSPAMFILTER is set 94. svctool: updated bogofilter.cf header_format, log_update_format - 09/01/2024 -95. spawn-filter.c: display filter used for mail rejected message -96. qmail-dkim.c: added DKIM_BAD_IDENTITY with letter Y +95. svctool: replace dk-filter with qmail-dkim when creating filterargs +96. qlocal_upgrade.in: repace dk-filter with qmail-dkim in filterargs control + file +97. spawn-filter.c: display filter used for mail rejected message +98. qmail-dkim.c: added DKIM_BAD_IDENTITY with letter Y * Tue Oct 17 2023 18:34:04 +0000 Manvendra Bhangui 3.0.5-1.1%{?dist} Release 3.0.5-1.1 Start 11/09/2023 End 17/10/2023 diff --git a/indimail-mta-x/indimail-mta.spec.in b/indimail-mta-x/indimail-mta.spec.in index 3974d66b5..8ac52c1bd 100644 --- a/indimail-mta-x/indimail-mta.spec.in +++ b/indimail-mta-x/indimail-mta.spec.in @@ -1,6 +1,6 @@ # # -# $Id: indimail-mta.spec.in,v 1.397 2024-01-06 11:12:23+05:30 Cprogrammer Exp mbhangui $ +# $Id: indimail-mta.spec.in,v 1.398 2024-01-09 12:37:36+05:30 Cprogrammer Exp mbhangui $ %undefine _missing_build_ids_terminate_build %global _unpackaged_files_terminate_build 1 @@ -599,7 +599,6 @@ echo ../resolv.conf 1>&3 %attr(755,root,root) %{_prefix}/bin/cidr %attr(755,root,root) %{_prefix}/bin/tcp-env %attr(755,root,root) %{_prefix}/bin/rrforward -%attr(755,root,root) %{_prefix}/bin/dk-filter %attr(755,root,root) %{_prefix}/bin/mailsubj %attr(755,root,root) %{_prefix}/bin/822field %attr(755,root,root) %{_prefix}/bin/qmail-cat diff --git a/indimail-mta-x/perm_list.in b/indimail-mta-x/perm_list.in index 44cbc89a7..67247e964 100644 --- a/indimail-mta-x/perm_list.in +++ b/indimail-mta-x/perm_list.in @@ -53,7 +53,6 @@ %attr(0755,root,root) @prefix@/bin/condredirect %attr(0755,root,root) @prefix@/bin/condtomaildir %attr(0755,root,root) @prefix@/bin/datemail #indimail-mini #qmta -%attr(0755,root,root) @prefix@/bin/dk-filter %attr(0755,root,root) @prefix@/bin/dknewkey %attr(0755,root,root) @prefix@/bin/dot-forward %attr(0755,root,root) @prefix@/bin/drate @@ -449,7 +448,6 @@ %attr(0644,root,root) @mandir@/man7/qmail-limits.7.gz %attr(0644,root,root) @mandir@/man7/multi-queue.7.gz %attr(0644,root,root) @mandir@/man8/cleanq.8.gz -%attr(0644,root,root) @mandir@/man8/dk-filter.8.gz %attr(0644,root,root) @mandir@/man8/dkim.8.gz %attr(0644,root,root) @mandir@/man8/dknewkey.8.gz %attr(0644,root,root) @mandir@/man8/greydaemon.8.gz diff --git a/indimail-mta-x/qlocal_upgrade.in b/indimail-mta-x/qlocal_upgrade.in index 1d38162f4..cecc4fc7a 100644 --- a/indimail-mta-x/qlocal_upgrade.in +++ b/indimail-mta-x/qlocal_upgrade.in @@ -1,5 +1,5 @@ # -# $Id: qlocal_upgrade.in,v 1.61 2024-01-06 11:07:19+05:30 Cprogrammer Exp mbhangui $ +# $Id: qlocal_upgrade.in,v 1.62 2024-01-09 12:38:01+05:30 Cprogrammer Exp mbhangui $ # PATH=/bin:/usr/bin:/usr/sbin:/sbin chown=$(which chown) @@ -26,7 +26,7 @@ check_update_if_diff() do_install() { -echo "Running $1 $Id: qlocal_upgrade.in,v 1.61 2024-01-06 11:07:19+05:30 Cprogrammer Exp mbhangui $" +echo "Running $1 $Id: qlocal_upgrade.in,v 1.62 2024-01-09 12:38:01+05:30 Cprogrammer Exp mbhangui $" # upgrade libindimail (VIRTUAL_PKG_LIB) for dynamic loading of libindimail # upgrade libmysqlclient path in /etc/indimail/control/libmysql /usr/sbin/svctool --fixsharedlibs @@ -34,7 +34,7 @@ echo "Running $1 $Id: qlocal_upgrade.in,v 1.61 2024-01-06 11:07:19+05:30 Cprogra do_post_upgrade() { -echo "Running $1 $Id: qlocal_upgrade.in,v 1.61 2024-01-06 11:07:19+05:30 Cprogrammer Exp mbhangui $" +echo "Running $1 $Id: qlocal_upgrade.in,v 1.62 2024-01-09 12:38:01+05:30 Cprogrammer Exp mbhangui $" if [ -x /bin/systemctl -o -x /usr/bin/systemctl ] ; then systemctl is-enabled svscan >/dev/null 2>&1 if [ $? -ne 0 ] ; then @@ -395,6 +395,33 @@ fi if [ ! -f @sysconfdir@/indimail-mta.cron -a -d /etc/cron.d ] ; then $cp @sysconfdir@/indimail-mta.cron /etc/cron.d/indimail-mta.cron fi + +if [ -f @sysconfdir@/control/filterargs ] ; then + out=$(/usr/bin/mktemp -t qlocalXXXXXXXXX) + exec 3>$out + cat @sysconfdir@/control/filterargs | while read line + do + echo $line | grep dk-filter >/dev/null + if [ $? -ne 0 ] ; then + echo "$line" 1>&3 + continue; + fi + echo $line | grep DKIMQUEUE >/dev/null + if [ $? -eq 0 ] ; then + line=$(echo $line | sed -e 's{bin/dk-filter{sbin/qmail-dkim{g') + else + line=$(echo $line | sed -e 's{bin/dk-filter{sbin/qmail-dkim{g' -e 's{${,DKIMQUEUE=/bin/cat{') + fi + echo "$line" 1>&3 + done + diff $out @sysconfdir@/control/filterargs >/dev/null + if [ $? -eq 0 ] ; then + /bin/rm -f $out + else + echo "Updated @sysconfdir@/control/filterargs" + mv $out @sysconfdir@/control/filterargs + fi +fi } case $1 in @@ -407,6 +434,9 @@ case $1 in esac # # $Log: qlocal_upgrade.in,v $ +# Revision 1.62 2024-01-09 12:38:01+05:30 Cprogrammer +# replace dk-filter with qmail-dkim +# # Revision 1.61 2024-01-06 11:07:19+05:30 Cprogrammer # add supplementary group qcerts for qmails user # diff --git a/indimail-mta-x/qmail-send.9 b/indimail-mta-x/qmail-send.9 index a88c4510c..cc1b23c46 100644 --- a/indimail-mta-x/qmail-send.9 +++ b/indimail-mta-x/qmail-send.9 @@ -680,7 +680,6 @@ todo-proc(8), qmail-clean(8), qmail-lspawn(8), qmail-dkim(8), -dk-filter(8), qmail-rspawn(8), svc(8), fsync(2), diff --git a/indimail-mta-x/qmta-send.9 b/indimail-mta-x/qmta-send.9 index 3b457d935..f3344c486 100644 --- a/indimail-mta-x/qmta-send.9 +++ b/indimail-mta-x/qmta-send.9 @@ -714,7 +714,6 @@ todo-proc(8), qmail-clean(8), qmail-lspawn(8), qmail-dkim(8), -dk-filter(8), qmail-rspawn(8), fsync(2), fdatasync(2), diff --git a/indimail-mta-x/slowq-send.9 b/indimail-mta-x/slowq-send.9 index 4d895bd78..48a5bbd69 100644 --- a/indimail-mta-x/slowq-send.9 +++ b/indimail-mta-x/slowq-send.9 @@ -646,7 +646,6 @@ todo-proc(8), qmail-clean(8), qmail-lspawn(8), qmail-dkim(8), -dk-filter(8), qmail-rspawn(8), fsync(2), fdatasync(2), diff --git a/indimail-mta-x/spawn-filter.9 b/indimail-mta-x/spawn-filter.9 index 455734d59..201336206 100644 --- a/indimail-mta-x/spawn-filter.9 +++ b/indimail-mta-x/spawn-filter.9 @@ -91,7 +91,7 @@ have the match done on recipient domain by setting \fBMATCH_RECIPIENT_DOMAIN\fR. .EX -indimail.org:remote:PREFIX/bin/dk-filter +indimail.org:remote:PREFIX/sbin/qmail-dkim:DKIMQUEUE=/bin/cat .EE \fIenvstr\fR mentioned above is a string of environment variable additions diff --git a/indimail-mta-x/svctool.in b/indimail-mta-x/svctool.in index 24b48b7cd..539d979c0 100644 --- a/indimail-mta-x/svctool.in +++ b/indimail-mta-x/svctool.in @@ -1,5 +1,5 @@ # -# $Id: svctool.in,v 2.720 2024-01-07 01:52:20+05:30 Cprogrammer Exp mbhangui $ +# $Id: svctool.in,v 2.721 2024-01-09 12:39:16+05:30 Cprogrammer Exp mbhangui $ # # @@ -27,7 +27,7 @@ host=@HOST@ shared_objects=0 use_dlmopen=0 skip_sendmail_check=0 -RCSID="# \$Id: svctool.in,v 2.720 2024-01-07 01:52:20+05:30 Cprogrammer Exp mbhangui $" +RCSID="# \$Id: svctool.in,v 2.721 2024-01-09 12:39:16+05:30 Cprogrammer Exp mbhangui $" # # End of User Configuration @@ -7035,7 +7035,7 @@ case "$dksign_option" in > $conf_dir/UNSIGNED_SUBJECT > $conf_dir/UNSIGNED_FROM if [ ! -f "$DESTDIR"$CONTROLDIR/filterargs ] ; then - echo "*:remote:$QmailBinPrefix/bin/dk-filter" > "$DESTDIR"$CONTROLDIR/filterargs + echo "*:remote:$QmailBinPrefix/sbin/qmail-dkim:DKIMQUEUE=/bin/cat" > "$DESTDIR"$CONTROLDIR/filterargs fi ;; none|*) @@ -7307,7 +7307,7 @@ case "$dksign_option" in > $conf_dir/UNSIGNED_SUBJECT > $conf_dir/UNSIGNED_FROM if [ ! -f "$DESTDIR"$CONTROLDIR/filterargs ] ; then - echo "*:remote:$QmailBinPrefix/bin/dk-filter" > "$DESTDIR"$CONTROLDIR/filterargs + echo "*:remote:$QmailBinPrefix/sbin/qmail-dkim:DKIMQUEUE=/bin/cat" > "$DESTDIR"$CONTROLDIR/filterargs fi ;; none|*) diff --git a/indimail-mta-x/tests/test-indimail-mta b/indimail-mta-x/tests/test-indimail-mta index c7fbf0b7e..a42a27d71 100755 --- a/indimail-mta-x/tests/test-indimail-mta +++ b/indimail-mta-x/tests/test-indimail-mta @@ -52,7 +52,6 @@ qmail_queue=$sbindir/qmail-queue qmail_multi=$sbindir/qmail-multi dkim=$bindir/dkim qmail_dkim=$sbindir"/qmail-dkim" -dk_filter=$bindir/dk-filter dknewkey=$bindir/dknewkey bogofilter=$bindir/bogofilter srsfilter=$bindir/srsfilter @@ -7080,87 +7079,6 @@ test_dkim() # Test No 10 printf "\r%126s\r" " " - echo "testing multi-signature signing+verification by dk-filter" - failed=0 - key1=$domainkey_dir/%/default - key2=$domainkey_dir/%/ed25519 - for i in example.com example.org - do - ( - echo "From: postmaster@$i" - echo "To: postmaster@$i" - echo "Subject: Test" - echo "Date: $(date -R)" - echo - echo "Test message" - ) | env \ - NODK="1" \ - QMAILREMOTE="1" \ - _SENDER=postmaster@$i \ - CONTROLDIR=/tmp \ - DKIMSIGN="$key1" \ - DKIMSIGNOPTIONS="-z 2" \ - DKIMSIGNEXTRA="$key2" \ - DKIMSIGNOPTIONSEXTRA="-z 4" $dk_filter > $tmpdir/result.out - sig_count=$(grep DKIM-Signature $tmpdir/result.out|wc -l) - for j in default ed25519 - do - printf "\r%126s\r" " " - if [ $verbose -gt 0 ] ; then - echo key $j domain $i - fi - selector=$(cat $domainkey_dir/$i/$j.pub |sed -e 's/.*(//' -e 's/).*//' -e '/^$/d' -e 's/"//g' -e 's/\t//g' | tr -d '\n') - case $j in - default) - echo " rsa+ed25519 with rsa-256 selector" - ;; - ed25519) - echo " rsa+ed25519 with ed25519 selector" - ;; - esac - cat $tmpdir/result.out | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - DKIMVERIFY="1" \ - VERBOSE=1 \ - SELECTOR_DATA="$selector" \ - $dk_filter >$out 2>$tmpdir/err.out - ret=$? - grep Signature $tmpdir/err.out | sed -e 's/Signature #/ Signature/g' \ - -e 's/01/rsa-256/' -e 's/02/ed25519/' -e 's/Failure.*/Failure - Correct/' - if [ $ret -eq 0 -a $sig_count -eq 2 ] ; then - tcount=$(expr $tcount + 1) - if [ $verbose -gt 0 ] ; then - echo "SUCCESS: [ret=$ret] domain=$i sig_count=$sig_count env - DKIMSIGN=$key1 DKIMSIGNEXTRA=$key2... dk-filter" - echo - fi - echo SUCCESS ======================== >$out - print_pct - else - echo "FAILED : [ret=$ret] domain=$i sig_count=$sig_count env - DKIMSIGN=$key1 DKIMSIGNEXTRA=$key2... dk-filter" - echo - echo FAILURE [$ret] ======================== >$out - echo >>$out - failed=1 - fi - done - /bin/rm -f $tmpdir/result.out - printf "\r%126s\r" " " - done - - if [ $verbose -eq 0 -a $failed -eq 0 ] ; then - printf "\r Success%118s\n" " " - echo - fi - if [ $failed -eq 1 ] ; then - echo "Test Failed for multi-signature signing+verification by dk-filter" - exit 1 - elif [ $verbose -ne 0 ] ; then - echo "All Tests succeeded for multi-signature signing+verification by dk-filter" - fi - - # Test No 11 - printf "\r%126s\r" " " echo "testing qmail-dkim signing+verification by qmail-dkim" failed=0 for i in $domainkey_dir/test $domainkey_dir/%/default $domainkey_dir/%/test $domainkey_dir/%/ed25519 @@ -7339,180 +7257,7 @@ test_dkim() echo "All Tests succeeded for $qmail_dkim signing+verification by $qmail_dkim" fi - # Test No 12 - printf "\r%126s\r" " " - echo "testing dk-filter signing" - failed=0 - for i in $domainkey_dir/test $domainkey_dir/%/default $domainkey_dir/%/test $domainkey_dir/%/notexist $domainkey_dir/% - do - for j in example.com example.org - do - printf "\r%126s\r" " " - if [ $verbose -gt 0 ] ; then - echo key $i domain $j - fi - ( - echo "From: postmaster@$j" - echo "To: postmaster@$j" - echo "Subject: Test" - echo "Date: $(date -R)" - echo - echo "Test message" - ) | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - CONTROLDIR=$cntrldir \ - _SENDER=postmaster@$j \ - DKIMSIGN=$i \ - $dk_filter > $out - ret=$? - if [ $ret -eq 0 ] ; then - tcount=$(expr $tcount + 1) - if [ $verbose -gt 0 ] ; then - echo "SUCCESS: [ret=$ret] env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - fi - echo SUCCESS ======================== >$out - print_pct - else - echo "FAILED : [ret=$ret] domain=$j key=$i env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - echo - echo FAILURE [$ret] domain=$j ======================== >$out - echo >>$out - failed=1 - fi - done - printf "\r%126s\r" " " - done - - for i in $domainkey_dir/notexist - do - for j in example.com example.org - do - printf "\r%126s\r" " " - if [ $verbose -gt 0 ] ; then - echo key $i domain $j - fi - ( - echo "From: postmaster@$j" - echo "To: postmaster@$j" - echo "Subject: Test" - echo "Date: $(date -R)" - echo - echo "Test message" - ) | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - CONTROLDIR=$cntrldir \ - _SENDER=postmaster@$j \ - DKIMSIGN="$i" \ - DKIMQUEUE=/bin/cat $dk_filter > $out 2>&1 - ret=$? - if [ $ret -eq 0 ] ; then - tcount=$(expr $tcount + 1) - echo SUCCESS ======================== > $out - print_pct - else - if [ $ret -ne $nokeyerror -a $ret -ne 88 ] ; then - echo "FAILED : [ret=$ret] domain=$j key=$i env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - echo - echo FAILURE [$ret] domain=$j ======================== > $out - echo >>$out - failed=1 - else - tcount=$(expr $tcount + 1) - if [ $verbose -gt 0 ] ; then - echo "SUCCESS: [ret=$ret] env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - fi - print_pct - fi - fi - done - printf "\r%126s\r" " " - done - - if [ $verbose -eq 0 -a $failed -eq 0 ] ; then - printf "\r Success%118s\n" " " - echo - fi - if [ $failed -eq 1 ] ; then - echo "Test Failed for dk-filter signing" - exit 1 - elif [ $verbose -ne 0 ] ; then - echo "All Tests succeeded for dk-filter signing" - fi - - # Test No 13 - printf "\r%126s\r" " " - echo "testing dk-filter signing+verification by dk-filter" - failed=0 - for i in default ed25519 - do - for j in example.com example.org - do - printf "\r%126s\r" " " - if [ $verbose -gt 0 ] ; then - echo key $i domain $j - fi - case $i in - default) - enc="-z 2" - ;; - ed25519) - enc="-z 4" - ;; - esac - selector=$(cat $domainkey_dir/$j/$i.pub |sed -e 's/.*(//' -e 's/).*//' -e '/^$/d' -e 's/"//g' -e 's/\t//g' | tr -d '\n') - ( - echo "From: postmaster@$j" - echo "To: postmaster@$j" - echo "Subject: Test" - echo "Date: $(date -R)" - echo - echo "Test message" - ) | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - CONTROLDIR=$cntrldir \ - _SENDER=postmaster@$j \ - DKIMSIGN="$domainkey_dir/%/$i" \ - DKIMSIGNOPTIONS="$enc" \ - $dk_filter | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - DKIMVERIFY="1" \ - SELECTOR_DATA="$selector" \ - $dk_filter > $out - ret=$? - if [ $ret -eq 0 ] ; then - tcount=$(expr $tcount + 1) - if [ $verbose -gt 0 ] ; then - echo "SUCCESS: [ret=$ret] env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - fi - echo SUCCESS ======================== >$out - print_pct - else - echo "FAILED : [ret=$ret] domain=$j key=$i env - NODK=1 QMAILREMOTE=1 _SENDER=postmaster@$j DKIMSIGN=$i DKIMQUEUE=/bin/cat $dk_filter" - echo - echo FAILURE [$ret] domain=$j ======================== >$out - echo >>$out - failed=1 - fi - done - printf "\r%126s\r" " " - done - - if [ $verbose -eq 0 -a $failed -eq 0 ] ; then - printf "\r Success%118s\n" " " - echo - fi - if [ $failed -eq 1 ] ; then - echo "Test Failed for dk-filter signing+verification by dk-filter" - exit 1 - elif [ $verbose -ne 0 ] ; then - echo "All Tests succeeded for dk-filter signing+verification by dk-filter" - fi - - # Test No 14 + # Test No 11 printf "\r%126s\r" " " echo "testing dkimkeys control file feature" failed=0 @@ -7625,91 +7370,7 @@ test_dkim() echo "All Tests succeeded for dkimkeys" fi - # Test No 15 - printf "\r%126s\r" " " - echo "testing multi-signature signing+verification by dk-filter DKIMSIGNEXTRA in dkimkeys" - ( - echo "ex*.com:$domainkey_dir/%/dkimkeys1:DKIMSIGNEXTRA=$domainkey_dir/%/dkimkeys2,DKIMSIGNOPTIONSEXTRA=-z 4" - echo "ex.*.org:$domainkey_dir/%/dkimkeys1:QREGEX=1,DKIMSIGNEXTRA=$domainkey_dir/%/dkimkeys2,DKIMSIGNOPTIONSEXTRA=-z 4" - ) >$cntrldir/dkimkeys - - failed=0 - for i in example.com example.org - do - ( - echo "From: postmaster@$i" - echo "To: postmaster@$i" - echo "Subject: Test" - echo "Date: $(date -R)" - echo - echo "Test message" - ) | env \ - NODK="1" \ - QMAILREMOTE="1" \ - _SENDER=postmaster@$i \ - CONTROLDIR=$cntrldir \ - DKIMSIGN="" \ - DKIMSIGNOPTIONS="-z 2" \ - $dk_filter > $tmpdir/result.out - sig_count=$(grep DKIM-Signature $tmpdir/result.out|wc -l) - for j in dkimkeys1 dkimkeys2 - do - printf "\r%126s\r" " " - if [ $verbose -gt 0 ] ; then - echo key $j domain $i - fi - selector=$(cat $domainkey_dir/$i/$j.pub |sed -e 's/.*(//' -e 's/).*//' -e '/^$/d' -e 's/"//g' -e 's/\t//g' | tr -d '\n') - case $j in - dkimkeys1) - echo " rsa+ed25519 with rsa-256 selector" - ;; - dkimkeys2) - echo " rsa+ed25519 with ed25519 selector" - ;; - esac - cat $tmpdir/result.out | env - \ - NODK="1" \ - QMAILREMOTE="1" \ - DKIMVERIFY="1" \ - VERBOSE=1 \ - SELECTOR_DATA="$selector" \ - $dk_filter >$out 2>$tmpdir/err.out - ret=$? - grep Signature $tmpdir/err.out | sed -e 's/Signature #/ Signature/g' \ - -e 's/01/rsa-256/' -e 's/02/ed25519/' -e 's/Failure.*/Failure - Correct/' - if [ $ret -eq 0 -a $sig_count -eq 2 ] ; then - tcount=$(expr $tcount + 1) - if [ $verbose -gt 0 ] ; then - echo "SUCCESS: [ret=$ret] domain=$i sig_count=$sig_count ... dk-filter" - echo - fi - echo SUCCESS ======================== >$out - print_pct - else - echo "FAILED : [ret=$ret] domain=$i sig_count=$sig_count ... dk-filter" - echo - echo FAILURE [$ret] ======================== >$out - echo >>$out - failed=1 - fi - done - /bin/rm -f $tmpdir/result.out - printf "\r%126s\r" " " - done - /bin/rm -f $cntrldir/dkimkeys - - if [ $verbose -eq 0 -a $failed -eq 0 ] ; then - printf "\r Success%118s\n" " " - echo - fi - if [ $failed -eq 1 ] ; then - echo "Test Failed for multi-signature signing+verification by dk-filter DKIMSIGNEXTRA in dkimkeys" - exit 1 - elif [ $verbose -ne 0 ] ; then - echo "All Tests succeeded for multi-signature signing+verification by dk-filter DKIMSIGNEXTRA in dkimkeys" - fi - - # Test No 16 + # Test No 12 key1=$domainkey_dir/example.com/dkimkeys1 qmail_inject=$bindir/qmail-inject qmail_queue=$sbindir/qmail-queue @@ -7865,7 +7526,7 @@ display_tests() echo "test blocking (badmailfrom, badrcptto)" echo "test blachole (blackholedrcpt, blackholedsender)" echo "test SPF" - echo "test DKIM using dkim, qmail-dkim, dk-filter" + echo "test DKIM using dkim, qmail-dkim" } failed=0