[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Sendmail et DSN 4.7.0



       Bonjour à tous,

J'utilise depuis des années un patch à sendmail pour envoyer des mails à des serveurs avec une configuration TLS foireuse.

        Ce patch est le suivant :

diff -ruN sendmail-8.15.2-/cf/feature/tls_failures.m4 sendmail-8.15.2/cf/feature --- sendmail-8.15.2-/cf/feature/tls_failures.m4 1969-12-31 16:00:00.000000000 -0 +++ sendmail-8.15.2/cf/feature/tls_failures.m4 2015-07-22 20:42:56.000000000 -0
@@ -0,0 +1,17 @@
+divert(-1)
+#
+# Copyright (c) 2015 Proofpoint, Inc. and its suppliers.
+#      All rights reserved.
+#
+# By using this file, you agree to the terms and conditions set
+# forth in the LICENSE file which can be found at the top level of
+# the sendmail distribution.
+#
+#
+
+define(`_TLS_FAILURES_', `1')dnl
+define(`_NEED_MACRO_MAP_', `1')dnl
+define(`_TLS_FAILURES_CNT_', ifelse(len(X`'_ARG_),`1',`5',_ARG_)))dnl
+
+LOCAL_CONFIG
+C{persistentMacros}{saved_verify}
diff -ruN sendmail-8.15.2-/cf/m4/proto.m4 sendmail-8.15.2/cf/m4/proto.m4
--- sendmail-8.15.2-/cf/m4/proto.m4     2015-05-22 06:42:27.000000000 -0700
+++ sendmail-8.15.2/cf/m4/proto.m4      2015-07-22 20:39:48.000000000 -0700
@@ -2686,7 +2686,11 @@
 R$*            $: $>D <$&{server_name}> <?> <! TLS_TRY_TAG> <>
 R<?>$*         $: $>A <$&{server_addr}> <?> <! TLS_TRY_TAG> <>
 R<?>$*         $: <$(access TLS_TRY_TAG`'_TAG_DELIM_ $: ? $)>
-R<?>$*         $@ OK
+ifdef(`_TLS_FAILURES_', `dnl
+R<?>$* $: <?> $&{saved_verify} $| $(arith l $@ `'_TLS_F +R<?> SOFTWARE $| TRUE $| $* $#error $@ 5.7.1 $: "550 do not try TLS with " $ +R<?> PROTOCOL $| TRUE $| $* $#error $@ 5.7.1 $: "550 do not try TLS with " $
+R<?>$*                         $@ OK
 ifdef(`_ATMPF_', `dnl tempfail?
R<$* _ATMPF_>$* $#error $@ 4.3.0 $: "451 Temporary system failure. Pleas R<NO>$* $#error $@ 5.7.1 $: "550 do not try TLS with " $&{server
@@ -2769,6 +2773,8 @@
 R$*                    $: $1 $| $>"Local_tls_server" $1
 R$* $| $#$*            $#$2
 R$* $| $*              $: $1', `dnl')
+ifdef(`_TLS_FAILURES_',`dnl
+R$*            $: $(macro {saved_verify} $@ $1 $) $1')
 ifdef(`_ACCESS_TABLE_', `dnl
 dnl store name of other side
 R$*            $: $(macro {TLS_Name} $@ $&{server_name} $) $1

Jusqu'ici, ça fonctionnait très bien. Rien à dire. J'ai fait une mise à jour de mon servuer de mail (debian/testing). Cela m'a mis à
jour sendmail (8.15.2-12). J'ai appliqué à nouveau le patch et... ça
ne fonctionne plus.

J'essaye donc de creuser, mais sans succès. Je n'arrive déjà pas à trouver la map macro. Où se trouve-t-elle ? Et comment débugguer la
chose ?

        Bien cordialement,

        JKB


Reply to: