summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHTEKK <CHTEKK@localhost>2007-11-24 12:24:24 +0000
committerCHTEKK <CHTEKK@localhost>2007-11-24 12:24:24 +0000
commitcbb8ce95fb149194ed12f0948fad6d16433e024f (patch)
tree5ab91c3a1e04f612cce92291543a741b9dabbf50
parentPrepare for 2.4.6 VDA-NG. (diff)
downloadchtekk-cbb8ce95fb149194ed12f0948fad6d16433e024f.tar.gz
chtekk-cbb8ce95fb149194ed12f0948fad6d16433e024f.tar.bz2
chtekk-cbb8ce95fb149194ed12f0948fad6d16433e024f.zip
Update patch to fix Gentoo bug #191384.
svn path=/; revision=64
-rw-r--r--vda/postfix-2.4.6-vda-ng.patch87
1 files changed, 52 insertions, 35 deletions
diff --git a/vda/postfix-2.4.6-vda-ng.patch b/vda/postfix-2.4.6-vda-ng.patch
index d834705..6dd32aa 100644
--- a/vda/postfix-2.4.6-vda-ng.patch
+++ b/vda/postfix-2.4.6-vda-ng.patch
@@ -1,11 +1,11 @@
-diff -Nru postfix-2.4.1/README_FILES/VDA_README postfix-2.4.1-vda/README_FILES/VDA_README
---- postfix-2.4.1/README_FILES/VDA_README 1970-01-01 01:00:00.000000000 +0100
-+++ postfix-2.4.1-vda/README_FILES/VDA_README 2007-05-01 12:52:50.000000000 +0200
+diff -Nru postfix-2.4.6/README_FILES/VDA_README postfix-2.4.6-vda-ng/README_FILES/VDA_README
+--- postfix-2.4.6/README_FILES/VDA_README 1970-01-01 01:00:00.000000000 +0100
++++ postfix-2.4.6-vda-ng/README_FILES/VDA_README 2007-11-24 12:48:53.000000000 +0100
@@ -0,0 +1,97 @@
+Installation:
+
+1 - Get the Postfix source code ( http://www.postfix.org/ )
-+2 - Get this software ( http://overlays.gentoo.org/dev/chtekk/wiki/VDA-NG ) for your Postfix version
++2 - Get this software ( http://vda.sourceforge.net ) for your Postfix version
+3 - Unpack the source code: tar -xvzf postfix-VERSION.tar.gz
+4 - Unpack the patch: gunzip postfix-VERSION-vda-ng-rREV.patch.gz
+5 - Apply the patch: cd postfix-VERSION; patch -p1 < ../postfix-VERSION-vda-ng-rREV.patch
@@ -98,11 +98,11 @@ diff -Nru postfix-2.4.1/README_FILES/VDA_README postfix-2.4.1-vda/README_FILES/V
+user1@domain.net.br # M2007022701 /^subject:.*BAD.*/m DISCARD /^from:.*user@domain.com.br*/m MOVE Trash
+user2@domain.com.br # M2007022617 /^subject:.*Viagra.*/m REJECT /^subject:.*trash.*/m MOVE SpamFolder /^subject:.*pharmacy.*/m DISCARD
+
-+More informations can be found at http://overlays.gentoo.org/dev/chtekk/wiki/VDA-NG
-diff -Nru postfix-2.4.1/src/global/mail_params.h postfix-2.4.1-vda/src/global/mail_params.h
---- postfix-2.4.1/src/global/mail_params.h 2007-02-25 03:15:42.000000000 +0100
-+++ postfix-2.4.1-vda/src/global/mail_params.h 2007-05-01 12:52:50.000000000 +0200
-@@ -2099,6 +2099,54 @@
++More informations can be found at http://vda.sourceforge.net
+diff -Nru postfix-2.4.6/src/global/mail_params.h postfix-2.4.6-vda-ng/src/global/mail_params.h
+--- postfix-2.4.6/src/global/mail_params.h 2007-07-11 01:47:45.000000000 +0200
++++ postfix-2.4.6-vda-ng/src/global/mail_params.h 2007-11-24 12:48:53.000000000 +0100
+@@ -2106,6 +2106,54 @@
#define DEF_VIRT_GID_MAPS ""
extern char *var_virt_gid_maps;
@@ -157,9 +157,9 @@ diff -Nru postfix-2.4.1/src/global/mail_params.h postfix-2.4.1-vda/src/global/ma
#define VAR_VIRT_MINUID "virtual_minimum_uid"
#define DEF_VIRT_MINUID 100
extern int var_virt_minimum_uid;
-diff -Nru postfix-2.4.1/src/util/file_limit.c postfix-2.4.1-vda/src/util/file_limit.c
---- postfix-2.4.1/src/util/file_limit.c 2003-10-22 20:48:36.000000000 +0200
-+++ postfix-2.4.1-vda/src/util/file_limit.c 2007-05-01 12:52:50.000000000 +0200
+diff -Nru postfix-2.4.6/src/util/file_limit.c postfix-2.4.6-vda-ng/src/util/file_limit.c
+--- postfix-2.4.6/src/util/file_limit.c 2003-10-22 20:48:36.000000000 +0200
++++ postfix-2.4.6-vda-ng/src/util/file_limit.c 2007-11-24 12:48:53.000000000 +0100
@@ -85,7 +85,11 @@
#else
struct rlimit rlim;
@@ -173,10 +173,10 @@ diff -Nru postfix-2.4.1/src/util/file_limit.c postfix-2.4.1-vda/src/util/file_li
if (setrlimit(RLIMIT_FSIZE, &rlim) < 0)
msg_fatal("setrlimit: %m");
#ifdef SIGXFSZ
-diff -Nru postfix-2.4.1/src/virtual/mailbox.c postfix-2.4.1-vda/src/virtual/mailbox.c
---- postfix-2.4.1/src/virtual/mailbox.c 2006-06-26 14:59:19.000000000 +0200
-+++ postfix-2.4.1-vda/src/virtual/mailbox.c 2007-07-29 14:29:30.000000000 +0200
-@@ -70,6 +70,60 @@
+diff -Nru postfix-2.4.6/src/virtual/mailbox.c postfix-2.4.6-vda-ng/src/virtual/mailbox.c
+--- postfix-2.4.6/src/virtual/mailbox.c 2006-06-26 14:59:19.000000000 +0200
++++ postfix-2.4.6-vda-ng/src/virtual/mailbox.c 2007-11-24 13:14:31.000000000 +0100
+@@ -70,6 +70,70 @@
#define YES 1
#define NO 0
@@ -189,8 +189,10 @@ diff -Nru postfix-2.4.1/src/virtual/mailbox.c postfix-2.4.1-vda/src/virtual/mail
+ int status = NO;
+
+ /*
-+ * Look up the virtual mailbox limit size for this user. Fall back to virtual_mailbox_limit in
-+ * case lookup failed. If virtual mailbox limit size is 0 or less, fall back to virtual_mailbox_limit.
++ * Look up the virtual mailbox limit size for this user.
++ * Fall back to virtual_mailbox_limit in case lookup failed.
++ * If virtual mailbox limit size is negative, fall back to virtual_mailbox_limit.
++ * If it's 0, set the mailbox limit to 0, which means unlimited.
+ * If it's more than 0 (positive int), check if the value is smaller than the maximum message size,
+ * if it is and the virtual mailbox limit can't be overridden, fall back to virtual_mailbox_limit and
+ * warn the user, else use the value directly as the mailbox limit.
@@ -219,8 +221,16 @@ diff -Nru postfix-2.4.1/src/virtual/mailbox.c postfix-2.4.1-vda/src/virtual/mail
+ myname, usr_attr.mailbox, n);
+ }
+ }
++ else if (n == 0) {
++ set_file_limit((off_t) n);
++ status = YES;
++
++ if (msg_verbose)
++ msg_info("%s: set virtual mailbox limit size for %s to %ld",
++ myname, usr_attr.mailbox, n);
++ }
+ else {
-+ /* Invalid limit size (negative), or zero. Use default virtual_mailbox_limit. */
++ /* Invalid limit size (negative). Use default virtual_mailbox_limit. */
+ set_file_limit(var_virt_mailbox_limit);
+ status = NO;
+ }
@@ -237,7 +247,7 @@ diff -Nru postfix-2.4.1/src/virtual/mailbox.c postfix-2.4.1-vda/src/virtual/mail
/* deliver_mailbox_file - deliver to recipient mailbox */
static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
-@@ -207,62 +261,72 @@
+@@ -207,62 +271,72 @@
* Look up the mailbox owner rights. Defer in case of trouble.
*/
uid_res = mail_addr_find(virtual_uid_maps, state.msg_attr.user,
@@ -345,9 +355,9 @@ diff -Nru postfix-2.4.1/src/virtual/mailbox.c postfix-2.4.1-vda/src/virtual/mail
/*
* Cleanup.
-diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/maildir.c
---- postfix-2.4.1/src/virtual/maildir.c 2006-06-26 14:59:19.000000000 +0200
-+++ postfix-2.4.1-vda/src/virtual/maildir.c 2007-07-29 14:29:37.000000000 +0200
+diff -Nru postfix-2.4.6/src/virtual/maildir.c postfix-2.4.6-vda-ng/src/virtual/maildir.c
+--- postfix-2.4.6/src/virtual/maildir.c 2006-06-26 14:59:19.000000000 +0200
++++ postfix-2.4.6-vda-ng/src/virtual/maildir.c 2007-11-24 13:20:57.000000000 +0100
@@ -63,28 +63,406 @@
#include <mbox_open.h>
#include <dsn_util.h>
@@ -786,7 +796,7 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
}
/*
-@@ -109,17 +486,84 @@
+@@ -109,17 +486,91 @@
* attribute to reflect the final recipient.
*/
if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0)
@@ -821,8 +831,10 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
+ }
+
+ /*
-+ * Look up the virtual maildir limit size for this user. Fall back to virtual_mailbox_limit in
-+ * case lookup failed. If virtual maildir limit size is 0 or less, fall back to virtual_mailbox_limit.
++ * Look up the virtual maildir limit size for this user.
++ * Fall back to virtual_mailbox_limit in case lookup failed.
++ * If virtual maildir limit size is negative, fall back to virtual_mailbox_limit.
++ * If it's 0, set the mailbox limit to 0, which means unlimited.
+ * If it's more than 0 (positive int), check if the value is smaller than the maximum message size,
+ * if it is and the virtual maildir limit can't be overridden, fall back to virtual_mailbox_limit and
+ * warn the user, else use the value directly as the maildir limit.
@@ -847,8 +859,13 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
+ myname, usr_attr.mailbox, n);
+ }
+ }
++ else if (n == 0) {
++ if (msg_verbose)
++ msg_info("%s: set virtual maildir limit size for %s to %ld",
++ myname, usr_attr.mailbox, n);
++ }
+ else {
-+ /* Invalid limit size (negative), or zero. Use default virtual_mailbox_limit. */
++ /* Invalid limit size (negative). Use default virtual_mailbox_limit. */
+ n = var_virt_mailbox_limit;
+ }
+ }
@@ -877,7 +894,7 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
/*
* Create and write the file as the recipient, so that file quota work.
-@@ -174,46 +618,296 @@
+@@ -174,46 +625,296 @@
* [...]
*/
set_eugid(usr_attr.uid, usr_attr.gid);
@@ -1211,7 +1228,7 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
}
set_eugid(var_owner_uid, var_owner_gid);
-@@ -223,31 +917,64 @@
+@@ -223,31 +924,64 @@
* location possibly under user control.
*/
if (mail_copy_status & MAIL_COPY_STAT_CORRUPT) {
@@ -1295,9 +1312,9 @@ diff -Nru postfix-2.4.1/src/virtual/maildir.c postfix-2.4.1-vda/src/virtual/mail
+
return (deliver_status);
}
-diff -Nru postfix-2.4.1/src/virtual/virtual.c postfix-2.4.1-vda/src/virtual/virtual.c
---- postfix-2.4.1/src/virtual/virtual.c 2007-03-27 02:07:43.000000000 +0200
-+++ postfix-2.4.1-vda/src/virtual/virtual.c 2007-05-01 12:52:50.000000000 +0200
+diff -Nru postfix-2.4.6/src/virtual/virtual.c postfix-2.4.6-vda-ng/src/virtual/virtual.c
+--- postfix-2.4.6/src/virtual/virtual.c 2007-03-27 02:07:43.000000000 +0200
++++ postfix-2.4.6-vda-ng/src/virtual/virtual.c 2007-11-24 12:48:53.000000000 +0100
@@ -330,12 +330,28 @@
int var_virt_mailbox_limit;
char *var_mail_spool_dir; /* XXX dependency fix */
@@ -1407,9 +1424,9 @@ diff -Nru postfix-2.4.1/src/virtual/virtual.c postfix-2.4.1-vda/src/virtual/virt
MAIL_SERVER_PRIVILEGED,
0);
}
-diff -Nru postfix-2.4.1/src/virtual/virtual.h postfix-2.4.1-vda/src/virtual/virtual.h
---- postfix-2.4.1/src/virtual/virtual.h 2006-01-08 00:59:47.000000000 +0100
-+++ postfix-2.4.1-vda/src/virtual/virtual.h 2007-05-01 12:52:50.000000000 +0200
+diff -Nru postfix-2.4.6/src/virtual/virtual.h postfix-2.4.6-vda-ng/src/virtual/virtual.h
+--- postfix-2.4.6/src/virtual/virtual.h 2006-01-08 00:59:47.000000000 +0100
++++ postfix-2.4.6-vda-ng/src/virtual/virtual.h 2007-11-24 12:48:53.000000000 +0100
@@ -34,6 +34,9 @@
extern MAPS *virtual_mailbox_maps;
extern MAPS *virtual_uid_maps;