steffen: server/amavisd Makefile, NONE, 1.1 amavisd.MYUSERS.patch, NONE, 1.1 kolab.patch, NONE, 1.1

cvs at intevation.de cvs at intevation.de
Thu Jan 6 14:28:24 CET 2005


Author: steffen

Update of /kolabrepository/server/amavisd
In directory doto:/tmp/cvs-serv2149/amavisd

Added Files:
	Makefile amavisd.MYUSERS.patch kolab.patch 
Log Message:
patch for amavisd-new

--- NEW FILE: Makefile ---
ifeq "x$(KOLABPKGURI)" "x"
  KOLABPKGURI = ftp://ftp.openpkg.org/release/2.2/SRC/PLUS
endif
ifeq "x$(KOLABRPMSRC)" "x"
  KOLABRPMSRC = /kolab/RPM/SRC
endif
ifeq "x$(KOLABCVSDIR)" "x"
  KOLABCVSDIR = $(CURDIR)
endif

PACKAGE=amavisd
VERSION=2.1.2
RELEASE=2.2.0

RPM=/kolab/bin/openpkg rpm
 
all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
	$(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm

	cp $(KOLABCVSDIR)/amavisd.MYUSERS.patch $(KOLABRPMSRC)/$(PACKAGE)/
	cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/           # Patch for .spec

	cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec 

$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
	wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm


--- NEW FILE: amavisd.MYUSERS.patch ---
diff -upr ../amavisd-new-2.1.2.orig/amavisd ./amavisd
--- ../amavisd-new-2.1.2.orig/amavisd	2004-09-06 20:30:58.000000000 +0200
+++ ./amavisd	2005-01-06 00:14:25.000000000 +0100
@@ -8808,10 +8808,15 @@ sub check_amcl_policy($$$$) {
     $smtp_resp = '450 4.5.0 Incomplete request'; $exit_code = EX_TEMPFAIL;
   } else {
     my($cl_ip) = $msginfo->client_addr;
+    my($sender) = $msginfo->sender;
     if ($cl_ip ne '' && defined $policy_bank{'MYNETS'}
         && lookup_ip_acl($cl_ip,@{ca('mynetworks_maps')}) ) {
       Amavis::load_policy_bank('MYNETS'); $policy_changed = 1;
     }
+    if ($sender ne '' && defined $policy_bank{'MYUSERS'}
+        && lookup(0,$sender,@{ca('local_domains_maps')})) {
+      Amavis::load_policy_bank('MYUSERS'); $policy_changed = 1;
+    }
     debug_oneshot(1)  if lookup(0,$msginfo->sender,@{ca('debug_sender_maps')});
     # check_mail() expects open file on $fh, need not be rewound
     my($fh) = $msginfo->mail_text;  my($tempdir) = $msginfo->mail_tempdir;
@@ -9373,6 +9378,10 @@ sub process_smtp_request($$$$) {
         # $submitter = "<$addr>" if !defined($submitter);  # rfc2554: MAY
           $submitter = '<>'      if !defined($msginfo->auth_user);
           $msginfo->auth_submitter($submitter);
+	  if ($sender ne '' && defined $policy_bank{'MYUSERS'}
+	      && lookup(0,$sender,@{ca('local_domains_maps')})) {
+	    Amavis::load_policy_bank('MYUSERS'); $policy_changed = 1;
+	  }
         };
         last;
       };
Kun i .: amavisd~
diff -upr ../amavisd-new-2.1.2.orig/amavisd.conf-sample ./amavisd.conf-sample
--- ../amavisd-new-2.1.2.orig/amavisd.conf-sample	2004-09-06 20:30:43.000000000 +0200
+++ ./amavisd.conf-sample	2005-01-06 00:12:18.000000000 +0100
@@ -1874,7 +1874,7 @@ $sa_dsn_cutoff_level = 10;  # spam level
 #
 
 ## Define some policy banks (sets of settings) and give them
-## arbitrary names (the '' and 'MYNETS' have special meaning):
+## arbitrary names (the '', 'MYNETS' and 'MYUSERS' have special meaning):
 #
 # $policy_bank{'ALT'} = {
 #   log_level => 3,
@@ -1930,6 +1930,17 @@ $sa_dsn_cutoff_level = 10;  # spam level
 #   bypass_banned_checks_maps => [1],  # or: don't spam-check internal mail
 # };
 
+## the name 'MYUSERS' has special semantics: this policy bank gets loaded
+## whenever the sender matches local_domains_maps. This only makes sense if
+## local sender addresses can be trusted -- for example by requireing 
+## authentication before letting the users send with their local address.
+#
+# $policy_bank{'MYUSERS'} = {  # mail from authenticated users on this system
+#   # Bounce only to local users
+#   final_virus_destiny      => D_BOUNCE,
+#   final_banned_destiny     => D_BOUNCE,
+# };
+
 
 ## Now we can assign policy banks to amavisd tcp port numbers listed in
 ## $inet_socket_port. Whenever the connection from MTA is received, first

--- NEW FILE: kolab.patch ---
--- amavisd.spec.orig	2005-01-06 00:28:37.000000000 +0100
+++ amavisd.spec	2005-01-06 00:42:17.000000000 +0100
@@ -34,7 +34,7 @@ Class:        PLUS
 Group:        Mail
 License:      GPL
 Version:      2.1.2
-Release:      2.2.0
+Release:      2.2.0_kolab
 
 #   package options
 %option       with_milter no
@@ -43,6 +43,7 @@ Release:      2.2.0
 Source0:      http://www.ijs.si/software/amavisd/amavisd-new-%{version}.tar.gz
 Source1:      http://homepages.hs-bremen.de/~renegat/amavislogsumm
 Source2:      rc.amavisd
+Patch0:       amavisd.MYUSERS.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -75,6 +76,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q -n amavisd-new-%{version}
+    %patch -p0 -P 0
     %{l_shtool} subst \
         -e "s;'clamscan';'%{l_prefix}/bin/clamscan';g" \
         -e "s;'uvscan';'%{l_prefix}/bin/uvscan';g" \





More information about the commits mailing list