This adds the following features:

1) Command line arg -m4:

  /sbin/conf.d/SuSEconfig.sendmail -m4 will write the sendmail-m4 configuration
  to stdout. (Running this through m4 will result in /etc/sendmail.cf.)
  
  This patch should be included in SuSE 8.0.

2) DNS RBL lookups:

  Add the feature of DNS RBL lookups to SuSEconfig, which can be
  configured via SENDMAIL_DNSRBL in /etc/rc.config.d/sendmail.rc.config

  Volker Kuhlmann, 23 Mar 2002

3) Masquerade exceptions:

  Domains listed here will not be masqueraded to FROM_HEADER for outgoing mails.
  Configured via MASQUERADE_EXCEPTIONS in /etc/rc.config.d/sendmail.rc.config

4) Trusted users

  Trusted users can be added via SENDMAIL_TRUSTEDUSERS in
  /etc/rc.config.d/sendmail.rc.config

Volker Kuhlmann, 22 Apr 2002



--- /etc/rc.config.d/sendmail.rc.config.orig	Tue Jan  8 17:57:11 2002
+++ /etc/rc.config.d/sendmail.rc.config	Mon May 13 11:18:29 2002
@@ -18,6 +18,10 @@
 # the local host (this must just be used for names differrent to the
 # hostname, for e.g. aliases like www.nowhere.com)
 #
+# Any hosts listed in here will cause reply-to: with the same host name
+# be rewritten to FROM_HEADER in outgoing emails.
+# Any host not listed in here will get "relaying denied"...
+#
 SENDMAIL_LOCALHOST="localhost"
 
 #
@@ -76,3 +80,39 @@
 # hosted on the same machine.
 #
 MASQUERADE_DOMAINS=""
+
+#
+# If you use free DNS domains (e.g. myhost.dyndns.org) and want to prevent
+# headers like "Reply-To: user@myhost.dyndns.org" being rewritten by sendmail to
+# "Reply-To: user@$FROM_HEADER" on outgoing mail, list myhost.dyndns.org here.
+# To be able to receive mail under the dynamic-DNS name, the name must also be
+# listed in SENDMAIL_LOCALHOST (or a "relaying denied" results).
+# (Space-separated list of domains.)
+# Volker Kuhlmann, 22 Apr 2002
+#
+MASQUERADE_EXCEPTIONS=""
+
+#
+# Use real-time black-hole lists. Sendmail will refuse to receive mail from any
+# IP number which is listed in any of the RBL lookups given here.
+# Space seperated list of host names to query via DNS.
+#     inputs.orbz.org
+#     relays.orbl.org
+#     relays.ordb.org
+#     relays.osirusoft.com
+#     orbs.dorkslayers.com
+#   Costs money (as at Mar 2002):
+#     dialups.mail-abuse.org
+#     blackholes.mail-abuse.org
+#     relays.mail-abuse.org
+# Volker Kuhlmann, 23 Mar 2002
+#
+SENDMAIL_DNSRBL=""
+
+#
+# Trusted users. The users listed here (space separated) can use sendmail -f
+# without generating an authentication warning. (These users can probably do
+# other things too.)
+# Volker Kuhlmann, 22 Apr 2002
+#
+SENDMAIL_TRUSTEDUSERS=""
--- /sbin/conf.d/SuSEconfig.sendmail.orig	Mon Sep 24 15:25:18 2001
+++ /sbin/conf.d/SuSEconfig.sendmail	Mon Apr 22 09:16:19 2002
@@ -3,6 +3,14 @@
 # Author: Florian La Roche
 #         Werner Fink      <werner@suse.de>
 
+# Generate a sendmail-m4 to stdout if called with -m4
+# (The usual stdout is redirected to stderr)
+# Part 1
+#~/script/showargs "$@"
+if [ "$1" = "-m4" ]; then
+    exec 5>&1 1>&2
+fi
+
 r=$ROOT
 test -f $r/etc/rc.config || {
 	echo "No $r/etc/rc.config found."
@@ -21,6 +29,7 @@
 . $r/lib/YaST/SuSEconfig.functions
 
 gen_sendmail_m4(){
+	local dom
 	cat <<-EOF
 	divert(-1)
 	include(\`$r/usr/share/sendmail/m4/cf.m4')
@@ -28,6 +37,9 @@
 	VERSIONID(\`@(#)Setup for SuSE Linux	8.11.0-0.4 (SuSE Linux) 05/09/2000')
 	OSTYPE(\`suse-linux')dnl
 	EOF
+	test -n "$SENDMAIL_TRUSTEDUSERS" \
+		&& echo "define(\`confTRUSTED_USERS',"\
+			"confTRUSTED_USERS\` $SENDMAIL_TRUSTEDUSERS')dnl"
 	if test -n "$SENDMAIL_SMARTHOST" -a "$SENDMAIL_SMARTHOST" != "YAST_ASK" ; then
 		echo "define(\`SMART_HOST',	\`$SENDMAIL_SMARTHOST')dnl"
 		echo "undefine(\`confHOST_STATUS_DIRECTORY')dnl"
@@ -48,6 +60,11 @@
 	if test "$SENDMAIL_DIALUP" = yes -a -n "$FQHOSTNAME" -a "$FQHOSTNAME" != "YAST_ASK" ; then
 		echo "FEATURE(\`dialup',	\`$FQHOSTNAME')dnl"
 	fi
+	if test -n "$SENDMAIL_DNSRBL"; then
+		for dom in $SENDMAIL_DNSRBL; do
+			echo "FEATURE(dnsbl,\`$dom')dnl"
+		done
+	fi
 	if test -n "$FROM_HEADER" -a "$FROM_HEADER" != "YAST_ASK" ; then
 		echo "MASQUERADE_AS(\`$FROM_HEADER')dnl"
 		echo "FEATURE(\`masquerade_envelope')dnl"
@@ -56,6 +73,11 @@
 			echo "FEATURE(\`limited_masquerade')dnl"
 		fi
 	fi
+	if test -n "$MASQUERADE_EXCEPTIONS"; then
+		for dom in $MASQUERADE_EXCEPTIONS; do
+			echo "MASQUERADE_EXCEPTION(\`$dom')dnl"
+		done
+	fi
 	if test -n "$SENDMAIL_GENERICS_DOMAIN" -a "$SENDMAIL_GENERICS_DOMAIN" != "YAST_ASK" ; then
 		echo "GENERICS_DOMAIN(\`$SENDMAIL_GENERICS_DOMAIN')dnl"
 	fi
@@ -85,6 +107,14 @@
 		echo "Cw $SENDMAIL_LOCALHOST"
 	fi
 }
+
+# Generate a sendmail-m4 to stdout if called with -m4
+# (The usual stdout is redirected to stderr)
+# Part 2
+if [ "$1" = "-m4" ]; then
+    gen_sendmail_m4 >&5
+    exit $?
+fi
 
 if test "$SENDMAIL_TYPE" != no -a "$SENDMAIL_TYPE" != YAST_ASK ; then
 	gen_sendmail_m4 | m4 - > $r/etc/sendmail.cf.SuSEconfig
