steffen: server/postfix Makefile, 1.8, 1.9 kolab.patch, NONE, 1.1 postfix-pipe.patch, NONE, 1.1

cvs at intevation.de cvs at intevation.de
Thu Dec 16 14:26:08 CET 2004


Author: steffen

Update of /kolabrepository/server/postfix
In directory doto:/tmp/cvs-serv9187/postfix

Added Files:
	Makefile kolab.patch postfix-pipe.patch 
Log Message:
Fix for issue576 (including postfix patch)


--- NEW FILE: kolab.patch ---
--- ../postfix.orig/postfix.spec	2004-10-11 20:49:19.000000000 +0200
+++ postfix.spec	2004-12-15 17:14:49.000000000 +0100
@@ -42,7 +42,7 @@ Class:        BASE
 Group:        Mail
 License:      IPL
 Version:      %{V_postfix}
-Release:      2.2.0
+Release:      2.2.0_kolab
 
 #   package options
 %option       with_fsl       yes
@@ -67,6 +67,7 @@ Patch1:       postfix.patch.pfls
 Patch2:       ftp://ftp.openpkg.org/sources/CPY/postfix/postfix-%{V_whoson}-whoson.patch
 Patch3:       http://www.ipnet6.org/postfix/download/postfix-libspf2-%{V_spf}.patch
 Patch4:       http://www.libsrs2.org/patch/postfix-libsrs2-%{V_srs}.patch
+Patch5:	      postfix-pipe.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -195,6 +196,7 @@ Conflicts:    exim, sendmail, ssmtp
 %if "%{with_whoson}" == "yes"
     %patch -p0 -P 2
 %endif
+    %patch -p0 -P 5
 
 %build
     #   configure Postfix (hard-core part I)

--- NEW FILE: postfix-pipe.patch ---
diff -upr ../postfix-2.1.5.orig/html/pipe.8.html ./html/pipe.8.html
--- ../postfix-2.1.5.orig/html/pipe.8.html	2004-08-09 16:51:09.000000000 +0200
+++ ./html/pipe.8.html	2004-12-16 13:17:00.000000000 +0100
@@ -140,6 +140,29 @@ PIPE(8)                                 
               ing information  from  the  Postfix  queue  manager
               delivery request:
 
+               <b>${client_address</b>}
+                      This macro expands to the remote client net-
+                      work address.
+ 
+                      This is available in Postfix 2.2 and  later.
+ 
+               <b>${client_helo</b>}
+                      This macro expands to the remote client HELO
+                      command parameter.
+ 
+                      This is available in Postfix 2.2 and  later.
+ 
+               <b>${client_hostname</b>}
+                      This  macro  expands  to  the  remote client
+                      hostname.
+ 
+                      This is available in Postfix 2.2 and  later.
+ 
+               <b>${client_protocol</b>}
+                      This macro expands to the remote client pro-
+                      tocol.
+ 
+                      This is available in Postfix 2.2 and  later.
               <b>${extension</b>}
                      This  macro expands to the extension part of
                      a recipient address.  For example,  with  an
diff -upr ../postfix-2.1.5.orig/man/man8/pipe.8 ./man/man8/pipe.8
--- ../postfix-2.1.5.orig/man/man8/pipe.8	2004-08-09 16:51:07.000000000 +0200
+++ ./man/man8/pipe.8	2004-12-16 13:16:01.000000000 +0100
@@ -128,6 +128,22 @@ In the command argument vector, the foll
 and replaced with corresponding information from the Postfix queue
 manager delivery request:
 .RS
+.IP \fB${\fBclient_address\fR}\fR
+This macro expands to the remote client network address.
+.sp
+This is available in Postfix 2.2 and later.
+.IP \fB${\fBclient_helo\fR}\fR
+This macro expands to the remote client HELO command parameter.
+.sp
+This is available in Postfix 2.2 and later.
+.IP \fB${\fBclient_hostname\fR}\fR
+This macro expands to the remote client hostname.
+.sp
+This is available in Postfix 2.2 and later.
+.IP \fB${\fBclient_protocol\fR}\fR
+This macro expands to the remote client protocol.
+.sp
+This is available in Postfix 2.2 and later.
 .IP \fB${\fBextension\fR}\fR
 This macro expands to the extension part of a recipient address.
 For example, with an address \fIuser+foo at domain\fR the extension is
Kun i ../postfix-2.1.5.orig: postfix-2.1.5
diff -upr ../postfix-2.1.5.orig/src/pipe/pipe.c ./src/pipe/pipe.c
--- ../postfix-2.1.5.orig/src/pipe/pipe.c	2004-07-24 01:09:21.000000000 +0200
+++ ./src/pipe/pipe.c	2004-12-16 13:11:43.000000000 +0100
@@ -332,6 +332,10 @@
 #define PIPE_DICT_EXTENSION	"extension"	/* key */
 #define PIPE_DICT_MAILBOX	"mailbox"	/* key */
 #define PIPE_DICT_SIZE		"size"	/* key */
+#define PIPE_DICT_CLIENT_ADDR   "client_address"        /* key */
+#define PIPE_DICT_CLIENT_NAME   "client_hostname"       /* key */
+#define PIPE_DICT_CLIENT_PROTO  "client_protocol"       /* key */
+#define PIPE_DICT_CLIENT_HELO   "client_helo"           /* key */
 
  /*
   * Flags used to pass back the type of special parameter found by
@@ -412,6 +416,10 @@ static int parse_callback(int type, VSTR
 	PIPE_DICT_EXTENSION, PIPE_FLAG_EXTENSION,
 	PIPE_DICT_MAILBOX, PIPE_FLAG_MAILBOX,
 	PIPE_DICT_SIZE, 0,
+	PIPE_DICT_CLIENT_ADDR, 0,
+	PIPE_DICT_CLIENT_NAME, 0,
+	PIPE_DICT_CLIENT_PROTO, 0,
+	PIPE_DICT_CLIENT_HELO, 0,
 	0, 0,
     };
     struct cmd_flags *p;
@@ -954,6 +962,15 @@ static int deliver_message(DELIVER_REQUE
     dict_update(PIPE_DICT_TABLE, PIPE_DICT_SIZE, STR(buf));
     vstring_free(buf);
 
+    dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_ADDR,
+		request->client_addr);
+    dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_HELO,
+		request->client_helo);
+    dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_NAME,
+		request->client_name);
+    dict_update(PIPE_DICT_TABLE, PIPE_DICT_CLIENT_PROTO,
+		request->client_proto);
+
     if ((expanded_argv = expand_argv(service, attr.command,
 				     rcpt_list, attr.flags)) == 0) {
 	deliver_status = eval_command_status(PIPE_STAT_DEFER, service,





More information about the commits mailing list