#! /bin/sh /usr/share/dpatch/dpatch-run
## 60_convert4r4.dpatch by Marc Haber <mh+debian-packages@zugschlus.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

diff -NurbBp exim.orig/src/convert4r4.src exim/src/convert4r4.src
--- exim.orig/src/convert4r4.src	2004-10-07 12:39:01.000000000 +0200
+++ exim/src/convert4r4.src	2009-11-15 12:17:21.000000000 +0100
@@ -653,6 +653,32 @@ return defined $main{$_[0]} && $main{$_[
 
 print STDERR "Runtime configuration file converter for Exim release 4.\n";
 
+if( !defined $ENV{"CONVERT4R4"} || $ENV{"CONVERT4R4"} ne "I understand this is an unsupported tool" ) {
+
+  print STDERR <<EOF;
+convert4r4 on Debian GNU/Linux deprecated
+
+This tool is unsupported by upstream and discouraged by the Debian Exim 4
+maintainers. It has multiple known bugs, and you need to manually
+review its output after using it anyway. Please seriously consider complete
+manual regeneration of the Exim 4 configuration, preferably by using the new
+Debconf interface to Exim 4.
+
+If you decide to ignore this advice and to use this script anyway,
+setting the environment variable CONVERT4R4 to the value
+\"I understand this is an unsupported tool\"
+will allow you to run the script. If you find bugs, you get to keep
+the pieces. Please do not file bugs against this script in the Debian
+BTS without providing a patch fixing the bugs, and please do not
+expect the upstream exim-users mailing list to answer questions.
+
+Kind regards
+the Debian Exim4 Maintainers
+EOF
+
+  exit 1;
+}
+
 $transport_start = $director_start = $router_start = $retry_start
   = $rewrite_start = $auth_start = 999999;
 
