summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHTEKK <CHTEKK@localhost>2007-04-13 22:25:13 +0000
committerCHTEKK <CHTEKK@localhost>2007-04-13 22:25:13 +0000
commit96aaeee390a4daabce2294769a6a0ec1f6a3dc2a (patch)
treeac2999ae4ae03d4060ebd72fc1b5b8ebdbd7b558
parentFix patch. (diff)
downloadchtekk-96aaeee390a4daabce2294769a6a0ec1f6a3dc2a.tar.gz
chtekk-96aaeee390a4daabce2294769a6a0ec1f6a3dc2a.tar.bz2
chtekk-96aaeee390a4daabce2294769a6a0ec1f6a3dc2a.zip
Add updated and clearer documentation.
svn path=/; revision=31
-rw-r--r--vda/postfix-2.4.0-vda-e-chtekk.patch117
1 files changed, 101 insertions, 16 deletions
diff --git a/vda/postfix-2.4.0-vda-e-chtekk.patch b/vda/postfix-2.4.0-vda-e-chtekk.patch
index 88149be..e7dca76 100644
--- a/vda/postfix-2.4.0-vda-e-chtekk.patch
+++ b/vda/postfix-2.4.0-vda-e-chtekk.patch
@@ -1,19 +1,104 @@
diff -Nru postfix-2.4.0/README_FILES/VDA_README postfix-2.4.0-vda/README_FILES/VDA_README
--- postfix-2.4.0/README_FILES/VDA_README 1970-01-01 01:00:00.000000000 +0100
-+++ postfix-2.4.0-vda/README_FILES/VDA_README 2007-04-13 19:05:33.000000000 +0200
-@@ -0,0 +1,9 @@
++++ postfix-2.4.0-vda/README_FILES/VDA_README 2007-04-14 00:24:44.000000000 +0200
+@@ -0,0 +1,94 @@
+Installation:
+
-+1 - Get the Postfix source code (http://www.postfix.org/)
-+2 - Get this software (http://vda.sourceforge.net/) for your Postfix version
++1 - Get the Postfix source code ( http://www.postfix.org/ )
++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.patch.gz
+5 - Apply the patch: cd postfix-VERSION; patch -p1 < ../postfix-VERSION-vda.patch
+6 - Apply your configuration in the Makefile
+7 - Make
++
++Configuration:
++
++#### Postfix main.cf
++
++# I use only virtual as local delivery
++mailbox_transport = virtual
++
++# Base directory where the mailboxes are located
++virtual_mailbox_base = /var/virtualmail
++
++# Virtual users maps
++virtual_mailbox_maps = hash:/etc/postfix/vmailbox
++transport_maps = hash:/etc/postfix/vtransport
++
++# Minimal permitted UID value (for virtual_uid_maps)
++virtual_minimum_uid = 1000
++
++# GIDs and UIDs to run as
++# Can also be stored in hash, mysql, ...
++virtual_uid_maps = static:4000
++virtual_gid_maps = static:4000
++
++# A maximum size limit for a mailbox
++virtual_mailbox_limit = 100000000
++
++# Quota values maps
++virtual_mailbox_limit_maps = hash:/etc/postfix/vquota
++
++# Limit only the INBOX
++# (useful for when you have IMAP users)
++virtual_mailbox_limit_inbox = no
++
++# Enable limits smaller than maximum message size
++virtual_mailbox_limit_override = yes
++
++# Enable Courier-IMAP compatible filenames
++virtual_maildir_extended = yes
++
++# Create maildirsize file if missing
++virtual_create_maildirsize = yes
++
++# Always bounce the message when quota reached
++virtual_overquota_bounce = yes
++
++# Custom message to send when bouncing
++#virtual_maildir_limit_message = "Sorry, maximum quota reached!"
++
++# Also count the Trash folder when calculating quotas?
++virtual_trash_count = yes
++
++# The name of the Trash folder
++#virtual_trash_name = ".Trash"
++
++# Enable the Maildirfilter feature
++virtual_maildir_filter = yes
++
++# Maildirfilter maps
++virtual_maildir_filter_maps = hash:/etc/postfix/vfilter
++
++#### Mailbox users file - vmailbox
++user@domain.com.br /path/to/mailbox - path relative to virtual_mailbox_base
++user1@domain.com.br /domain.com.br/user1 - no trailing slash, user has a MAILBOX
++user2@domain.com.br /domain.com.br/user2 - no trailing slash, user has a MAILBOX
++user1@domain.net.br /domain.net.br/user1/ - trailing slash, user has a MAILDIR
++user2@domain.net.br /domain.net.br/user2/ - trailing slash, user has a MAILDIR
++
++#### Quota users file - vquota
++user@domain.com.br QUOTA IN BYTES
++user1@domain.com.br 2048000
++user2@domain.com.br 2048000
++user1@domain.net.br 5192000
++user2@domain.net.br 0 - NO QUOTA
++
++#### Maildirfilter file - vfilter
++# ATTENTION: the syntax for maildirfilter values is the following:
++# the # sign, followed by a space, followed by a M (uppercase), then a modification time value
++# (you need to change this when you change the regexps) made of a maximum of 10 digits, then a
++# space again and an arbitrary number of regexps (a regexp always starts with /^ and ends with
++# a space) and their corresponding actions
++user@domain.com.br # M<timestamp> regexp1 action1 regexp2 action2 ...
++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://vda.sourceforge.net/
diff -Nru postfix-2.4.0/src/global/mail_params.h postfix-2.4.0-vda/src/global/mail_params.h
--- postfix-2.4.0/src/global/mail_params.h 2007-02-25 03:15:42.000000000 +0100
-+++ postfix-2.4.0-vda/src/global/mail_params.h 2007-04-13 19:05:33.000000000 +0200
++++ postfix-2.4.0-vda/src/global/mail_params.h 2007-04-13 23:02:09.000000000 +0200
@@ -2099,6 +2099,54 @@
#define DEF_VIRT_GID_MAPS ""
extern char *var_virt_gid_maps;
@@ -71,7 +156,7 @@ diff -Nru postfix-2.4.0/src/global/mail_params.h postfix-2.4.0-vda/src/global/ma
extern int var_virt_minimum_uid;
diff -Nru postfix-2.4.0/src/util/file_limit.c postfix-2.4.0-vda/src/util/file_limit.c
--- postfix-2.4.0/src/util/file_limit.c 2003-10-22 20:48:36.000000000 +0200
-+++ postfix-2.4.0-vda/src/util/file_limit.c 2007-04-13 19:05:33.000000000 +0200
++++ postfix-2.4.0-vda/src/util/file_limit.c 2007-04-13 23:02:09.000000000 +0200
@@ -85,7 +85,11 @@
#else
struct rlimit rlim;
@@ -87,7 +172,7 @@ diff -Nru postfix-2.4.0/src/util/file_limit.c postfix-2.4.0-vda/src/util/file_li
#ifdef SIGXFSZ
diff -Nru postfix-2.4.0/src/virtual/mailbox.c postfix-2.4.0-vda/src/virtual/mailbox.c
--- postfix-2.4.0/src/virtual/mailbox.c 2006-06-26 14:59:19.000000000 +0200
-+++ postfix-2.4.0-vda/src/virtual/mailbox.c 2007-04-13 19:16:29.000000000 +0200
++++ postfix-2.4.0-vda/src/virtual/mailbox.c 2007-04-13 23:02:09.000000000 +0200
@@ -70,6 +70,58 @@
#define YES 1
#define NO 0
@@ -253,7 +338,7 @@ diff -Nru postfix-2.4.0/src/virtual/mailbox.c postfix-2.4.0-vda/src/virtual/mail
* Cleanup.
diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/maildir.c
--- postfix-2.4.0/src/virtual/maildir.c 2006-06-26 14:59:19.000000000 +0200
-+++ postfix-2.4.0-vda/src/virtual/maildir.c 2007-04-13 19:05:33.000000000 +0200
++++ postfix-2.4.0-vda/src/virtual/maildir.c 2007-04-13 23:02:09.000000000 +0200
@@ -63,10 +63,243 @@
#include <mbox_open.h>
#include <dsn_util.h>
@@ -498,7 +583,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
/* deliver_maildir - delivery to maildir-style mailbox */
int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr)
-@@ -86,6 +318,27 @@
+@@ -86,6 +319,27 @@
struct stat st;
struct timeval starttime;
@@ -526,7 +611,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
GETTIMEOFDAY(&starttime);
/*
-@@ -122,6 +375,81 @@
+@@ -122,6 +376,81 @@
curdir = concatenate(usr_attr.mailbox, "cur/", (char *) 0);
/*
@@ -608,7 +693,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
* Create and write the file as the recipient, so that file quota work.
* Create any missing directories on the fly. The file name is chosen
* according to ftp://koobera.math.uic.edu/www/proto/maildir.html:
-@@ -178,6 +505,7 @@
+@@ -178,6 +507,7 @@
(unsigned long) starttime.tv_sec, var_pid, get_hostname());
tmpfile = concatenate(tmpdir, STR(buf), (char *) 0);
newfile = 0;
@@ -616,7 +701,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
if ((dst = vstream_fopen(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600)) == 0
&& (errno != ENOENT
|| make_dirs(tmpdir, 0700) < 0
-@@ -200,17 +528,254 @@
+@@ -200,17 +530,254 @@
(unsigned long) starttime.tv_usec,
get_hostname());
newfile = concatenate(newdir, STR(buf), (char *) 0);
@@ -872,7 +957,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
}
if (unlink(tmpfile) < 0)
msg_warn("remove %s: %m", tmpfile);
-@@ -231,6 +796,9 @@
+@@ -231,6 +798,9 @@
STR(why->reason));
msg_warn("perhaps you need to create the maildirs in advance");
}
@@ -882,7 +967,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
vstring_sprintf_prepend(why->reason, "maildir delivery failed: ");
deliver_status =
(STR(why->status)[0] == '4' ?
-@@ -246,6 +814,8 @@
+@@ -246,6 +816,8 @@
myfree(newdir);
myfree(tmpdir);
myfree(curdir);
@@ -893,7 +978,7 @@ diff -Nru postfix-2.4.0/src/virtual/maildir.c postfix-2.4.0-vda/src/virtual/mail
myfree(newfile);
diff -Nru postfix-2.4.0/src/virtual/virtual.c postfix-2.4.0-vda/src/virtual/virtual.c
--- postfix-2.4.0/src/virtual/virtual.c 2007-03-27 02:07:43.000000000 +0200
-+++ postfix-2.4.0-vda/src/virtual/virtual.c 2007-04-13 19:05:33.000000000 +0200
++++ postfix-2.4.0-vda/src/virtual/virtual.c 2007-04-13 23:02:09.000000000 +0200
@@ -330,12 +330,27 @@
int var_virt_mailbox_limit;
char *var_mail_spool_dir; /* XXX dependency fix */
@@ -1000,7 +1085,7 @@ diff -Nru postfix-2.4.0/src/virtual/virtual.c postfix-2.4.0-vda/src/virtual/virt
}
diff -Nru postfix-2.4.0/src/virtual/virtual.h postfix-2.4.0-vda/src/virtual/virtual.h
--- postfix-2.4.0/src/virtual/virtual.h 2006-01-08 00:59:47.000000000 +0100
-+++ postfix-2.4.0-vda/src/virtual/virtual.h 2007-04-13 19:05:33.000000000 +0200
++++ postfix-2.4.0-vda/src/virtual/virtual.h 2007-04-13 23:02:09.000000000 +0200
@@ -34,6 +34,8 @@
extern MAPS *virtual_mailbox_maps;
extern MAPS *virtual_uid_maps;