There several Openpkg sendmail.spec improvements I'm thinking about
that I would
be glad to see included in next Openpkg release. 
 
Most of the ideas come from the FreeBSD sendmail port (thks dirk for
your efforts) :
- ability to disable IPV6 support
- ability to use picky_helo_check
- ability to use socketmap

Additional idea that might interest ISPs/companies (not in the FreeBSD
port)  : one-line additional  logging for billing/statistics (with
sender/recipient email addresses, mailservers and size of message) :

This billing line  just requires a small patch to sendmail/conf.c
(checkcompat function).
It needs some additional testing (it used to work on 8.12.x series) but 
using a small awk or perl script with it you can easily have some detailed
statistics on your mail traffic. 

Regards, 

SL/
-- 
Control your destiny or somebody else will (Jack Welch)
--- sendmail.spec.ORIG	2005-02-08 20:16:13.144206608 +0100
+++ sendmail.spec	2005-02-08 21:29:40.016260224 +0100
@@ -43,6 +43,10 @@
 %option       with_sasl     no
 %option       with_ldap     no
 %option       with_mysql    no
+%option       with_ipv6     yes
+%option       with_picky_helo_check    no
+%option       with_socketmap  no
+%option       with_accounting no
 
 #   list of sources
 Source0:      ftp://ftp.sendmail.org/pub/sendmail/sendmail.%{version}.tar.gz
@@ -51,6 +55,7 @@
 Source3:      fsl.sendmail
 Source4:      rc.sendmail
 Patch0:       sendmail.patch
+Patch1:       sendmail-accounting.patch	
 
 #   build information
 Prefix:       %{l_prefix}
@@ -101,7 +106,10 @@
     #   unpack standard tarballs
     %setup -q
     %setup -q -T -D -a 1
-    %patch -p0
+    %patch0 -p0
+    %if "%{with_accounting}" == "yes"
+    %patch1 -p0
+    %endif
 
     #   make install process unprivileged
     %{l_shtool} subst \
@@ -203,6 +211,16 @@
         echo "APPENDDEF(\`confINCDIRS',\`%{l_cppflags mysql .}')dnl"
         echo "APPENDDEF(\`confLIBS',\`%{l_ldflags mysql .} -lmysqlclient -lz -lm')dnl"
 %endif
+%if "%{with_picky_helo_check}" == "yes"
+        echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DPICKY_HELO_CHECK')dnl"
+%endif
+%if "%{with_socketmap}" == "yes"
+        echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DSOCKETMAP')dnl"
+%endif
+%if "%{with_ipv6}" == "yes"
+        echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DNETINET6')dnl"
+        echo "APPENDDEF(\`conf_libmilter_ENVDEF', \`-DNETINET6')dnl"
+%endif
     ) >devtools/Site/site.config.m4
 
     #   build Sendmail package

--- sendmail/conf.c.ORIG	2005-02-08 20:49:19.922170448 +0100
+++ sendmail/conf.c	2005-02-08 20:50:54.378810856 +0100
@@ -1321,6 +1321,12 @@
 		return EX_UNAVAILABLE;
 	}
 #endif /* EXAMPLE_CODE */
+	/* Simple Accounting Lines */
+        if (RealHostName != NULL)
+         {
+          sm_syslog (LOG_INFO, e->e_id, "ACCOUNTING: %s %s %s %s %ld", RealHostName, to->q_host, e->e_from.q_paddr, e->e_to, e->e_msgsize );
+         }
+
 	return EX_OK;
 }
 /*

Reply via email to