From 8e6b9a841b88026778b603eeef3a7051003dc02e Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 25 Jul 2015 17:18:44 +0000 Subject: [PATCH] - drop vda - dead, unecessary thing --- format-security.patch | 26 ----- postfix-vda-bigquota.patch | 204 ------------------------------------- postfix.spec | 14 --- 3 files changed, 244 deletions(-) delete mode 100644 format-security.patch delete mode 100644 postfix-vda-bigquota.patch diff --git a/format-security.patch b/format-security.patch deleted file mode 100644 index d5ffaf9..0000000 --- a/format-security.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- postfix-2.11.5/src/virtual/maildir.c.orig 2015-06-08 08:05:21.064261014 +0000 -+++ postfix-2.11.5/src/virtual/maildir.c 2015-06-08 08:07:40.918261014 +0000 -@@ -972,19 +972,19 @@ int deliver_maildir(LOCAL_STATE state, U - if (*var_virt_maildir_limit_message_maps != 0 && (limit_message = mail_addr_find(virtual_maildir_limit_message_maps, state.msg_attr.user, (char **) NULL)) != 0) { - errno = errnored; - if (errno == EFBIG) { -- dsb_simple(why, "5.2.2", limit_message, NULL); -+ dsb_simple(why, "5.2.2", "%s", limit_message, NULL); - } - if (errno == EDQUOT) { -- dsb_simple(why, "4.2.2", limit_message, NULL); -+ dsb_simple(why, "4.2.2", "%s", limit_message, NULL); - } - } - else { - errno = errnored; - if (errno == EFBIG) { -- dsb_simple(why, "5.2.2", var_virt_maildir_limit_message, NULL); -+ dsb_simple(why, "5.2.2", "%s", var_virt_maildir_limit_message, NULL); - } - if (errno == EDQUOT) { -- dsb_simple(why, "4.2.2", var_virt_maildir_limit_message, NULL); -+ dsb_simple(why, "4.2.2", "%s", var_virt_maildir_limit_message, NULL); - } - } - diff --git a/postfix-vda-bigquota.patch b/postfix-vda-bigquota.patch deleted file mode 100644 index 6476645..0000000 --- a/postfix-vda-bigquota.patch +++ /dev/null @@ -1,204 +0,0 @@ -diff -ur postfix-2.7.0/src/virtual/maildir.c postfix-2.7.0-bg/src/virtual/maildir.c ---- postfix-2.7.0/src/virtual/maildir.c 2010-04-15 16:46:03.766130197 +0200 -+++ postfix-2.7.0-bg/src/virtual/maildir.c 2010-04-15 16:55:02.496126981 +0200 -@@ -65,6 +65,7 @@ - - /* Patch library. */ - -+#include - #include /* opendir(3), stat(2) */ - #include /* stat(2) */ - #include /* opendir(3) */ -@@ -98,14 +99,14 @@ - * Returns the size of all mails as read from maildirsize, - * zero if it couldn't read the file. - */ --static long read_maildirsize(char *filename, long *sumptr, long *countptr) -+static long read_maildirsize(char *filename, int64_t *sumptr, int64_t *countptr) - { - char *myname = "read_maildirsize"; - struct stat statbuf; - VSTREAM *sizefile; - char *p; - int len, first; -- long sum = 0, count = 0, ret_value = -1; -+ int64_t sum = 0, count = 0, ret_value = -1; - - if (msg_verbose) - msg_info("%s: we will use sizefile = '%s'", myname, filename); -@@ -136,7 +137,7 @@ - first = 1; - - while (*p) { -- long n = 0, c = 0; -+ int64_t n = 0, c = 0; - char *q = p; - - while (*p) { -@@ -151,7 +152,7 @@ - continue; - } - -- if (sscanf(q, "%ld %ld", &n, &c) == 2) { -+ if (sscanf(q, "%lld %lld", &n, &c) == 2) { - sum += n; - count += c; - /* if (msg_verbose) -@@ -179,7 +180,7 @@ - ret_value = -1; - } else { - if (msg_verbose) -- msg_info("%s: we will return Maildir size = %ld, count = %ld", myname, *sumptr, *countptr); -+ msg_info("%s: we will return Maildir size = %lld, count = %lld", myname, *sumptr, *countptr); - - ret_value = sum; - } -@@ -200,7 +201,7 @@ - * Returns the size given in ",S=" in the filename, - * zero if it cannot find ",S=" in the filename. - */ --static long maildir_parsequota(const char *n) -+static int64_t maildir_parsequota(const char *n) - { - const char *o; - int yes = 0; -@@ -225,7 +226,7 @@ - } - - if (yes) { -- long s = 0; -+ int64_t s = 0; - - while (*o >= '0' && *o <= '9') - s = s*10 + (*o++ - '0'); -@@ -252,11 +253,11 @@ - * Returns the sum of the sizes of all measurable files, - * zero if the directory could not be opened. - */ --static long check_dir_size(char *dirname, long *countptr) -+static int64_t check_dir_size(char *dirname, int64_t *countptr) - { - char *myname = "check_dir_size"; - DIR *dir; -- long sum = 0; -+ int64_t sum = 0; - struct dirent *ent; - struct stat statbuf; - -@@ -277,7 +278,7 @@ - - while ((ent = readdir(dir)) != NULL) { - char *name = ent->d_name; -- long tmpsum = 0; -+ int64_t tmpsum = 0; - VSTRING *buffer; - - /* do not count dot a double-dot dirs */ -@@ -324,7 +325,7 @@ - } - if ((statbuf.st_mode & S_IFREG) != 0) { - if (strcmp(dirname + strlen(dirname) - 3, "new") == 0 || strcmp(dirname + strlen(dirname) - 3, "cur") == 0 || strcmp(dirname + strlen(dirname) - 3, "tmp") == 0) { -- sum += (long) statbuf.st_size; -+ sum += (int64_t) statbuf.st_size; - (*countptr)++; - } - } -@@ -338,7 +339,7 @@ - closedir(dir); - - if (msg_verbose) -- msg_info("%s: full scan done: dir=%s sum=%ld count=%ld", myname, dirname, sum, *countptr); -+ msg_info("%s: full scan done: dir=%s sum=%lld count=%lld", myname, dirname, sum, *countptr); - - return sum; - } -@@ -456,9 +457,9 @@ - char *sizefilename = (char *) 0; /* Maildirsize file name. */ - VSTRING *filequota; /* Quota setting from the maildirsize file. */ - VSTREAM *sizefile; /* Maildirsize file handle. */ -- long n = 0; /* Limit in long integer format. */ -- long saved_count = 0; /* The total number of files. */ -- long saved_size = 0; /* The total quota of all files. */ -+ int64_t n = 0; /* Limit in long integer format. */ -+ int64_t saved_count = 0; /* The total number of files. */ -+ int64_t saved_size = 0; /* The total quota of all files. */ - struct stat mail_stat; /* To check the size of the mail to be written. */ - struct stat sizefile_stat; /* To check the size of the maildirsize file. */ - time_t tm; /* To check the age of the maildirsize file. */ -@@ -541,7 +542,7 @@ - * warn the user, else use the value directly as the maildir limit. - */ - if (*var_virt_mailbox_limit_maps != 0 && (limit_res = mail_addr_find(virtual_mailbox_limit_maps, state.msg_attr.user, (char **) NULL)) != 0) { -- n = atol(limit_res); -+ n = strtoll(limit_res, NULL, 10); - if (n > 0) { - if ((n < var_message_limit) && (!var_virt_mailbox_limit_override)) { - n = var_virt_mailbox_limit; -@@ -552,13 +553,13 @@ - } - else { - if (msg_verbose) -- msg_info("%s: set virtual maildir limit size for %s to %ld", -+ msg_info("%s: set virtual maildir limit size for %s to %lld", - myname, usr_attr.mailbox, n); - } - } - else if (n == 0) { - if (msg_verbose) -- msg_info("%s: set virtual maildir limit size for %s to %ld", -+ msg_info("%s: set virtual maildir limit size for %s to %lld", - myname, usr_attr.mailbox, n); - } - else { -@@ -580,7 +581,7 @@ - x >= 0 = reading successfully finished - sum si returned, so sum size of Maildir was 0 or more */ - if (!var_virt_mailbox_limit_inbox && var_virt_maildir_extended && read_maildirsize(sizefilename, &saved_size, &saved_count) >= 0) { - if (msg_verbose) -- msg_info("%s: maildirsize used=%s sum=%ld count=%ld", myname, sizefilename, saved_size, saved_count); -+ msg_info("%s: maildirsize used=%s sum=%lld count=%lld", myname, sizefilename, saved_size, saved_count); - } else { - if (msg_verbose) - msg_info("%s: var_virt_mailbox_limit == 1 OR var_virt_maildir_extended == 0 OR read_maildidrsize() returned value x < 0 as saying something failed", myname); -@@ -693,7 +694,7 @@ - */ - if (stat(tmpfile, &mail_stat) == 0) { - if (n != 0) { -- saved_size += (long) mail_stat.st_size; -+ saved_size += (int64_t) mail_stat.st_size; - saved_count++; - } - if (var_virt_maildir_extended) { -@@ -710,7 +711,7 @@ - */ - if (saved_size > n) { - mail_copy_status = MAIL_COPY_STAT_WRITE; -- if (((long) mail_stat.st_size > n) || (var_virt_overquota_bounce)) -+ if (((int64_t) mail_stat.st_size > n) || (var_virt_overquota_bounce)) - errno = EFBIG; - else - errno = EDQUOT; -@@ -889,7 +890,7 @@ - filequota = vstring_alloc(128); - vstring_get_null_bound(filequota, sizefile, 127); - vstream_fclose(sizefile); -- if (atol(vstring_export(filequota)) != n) -+ if (strtoll(vstring_export(filequota), NULL, 10) != n) - unlink(sizefilename); - } - -@@ -909,13 +910,13 @@ - - /* If the creation worked, write to the file, otherwise just give up. */ - if (sizefile) { -- vstream_fprintf(sizefile, "%ldS\n%ld %ld\n", n, saved_size, saved_count); -+ vstream_fprintf(sizefile, "%lldS\n%lld %lld\n", n, saved_size, saved_count); - vstream_fclose(sizefile); - } - } - else { - /* We opened maildirsize, so let's just append this transaction and close it. */ -- vstream_fprintf(sizefile, "%ld 1\n", (long) mail_stat.st_size); -+ vstream_fprintf(sizefile, "%lld 1\n", (int64_t) mail_stat.st_size); - vstream_fclose(sizefile); - } - diff --git a/postfix.spec b/postfix.spec index 933468c..ad556eb 100644 --- a/postfix.spec +++ b/postfix.spec @@ -7,12 +7,10 @@ %bcond_without sasl # without SMTP AUTH support %bcond_without ssl # without SSL/TLS support %bcond_without cdb # without cdb map support -%bcond_with vda # with VDA patch %bcond_with hir # with Beeth's header_if_reject patch %bcond_with tcp # with unofficial tcp: lookup table %bcond_without epoll # disable epoll for 2.4 kernels -%define vda_ver v13-2.10.0 Summary: Postfix Mail Transport Agent Summary(cs.UTF-8): Postfix - program pro přepravu pošty (MTA) Summary(es.UTF-8): Postfix - Un MTA (Mail Transport Agent) de alto desempeño @@ -34,14 +32,10 @@ Source3: %{name}.init Source4: %{name}.sysconfig Source5: %{name}.sasl Source6: %{name}.pamd -Source7: http://vda.sourceforge.net/VDA/%{name}-vda-%{vda_ver}.patch -# Source7-md5: 01e1b031d79b85f3cb67d98ceddd775d Source8: %{name}-bounce.cf.pl # http://postfix.state-of-mind.de/bounce-templates/bounce.de-DE.cf Source9: %{name}-bounce.cf.de Source10: %{name}.monitrc -Source11: %{name}-vda-bigquota.patch -#Source11: http://vda.sourceforge.net/VDA/%{name}-%{vda_ver}-vda-ng-bigquota.patch.gz # -ource11-md5: d46103195b43ec5784ea2c166b238f71 Patch0: %{name}-config.patch Patch1: %{name}-conf_msg.patch @@ -56,7 +50,6 @@ Patch8: %{name}-dictname.patch Patch9: %{name}-make-jN.patch Patch10: %{name}-link.patch Patch11: %{name}-scache_clnt.patch -Patch12: format-security.patch URL: http://www.postfix.org/ %{?with_sasl:BuildRequires: cyrus-sasl-devel} BuildRequires: db-devel @@ -258,10 +251,6 @@ Plik monitrc do monitorowania serwera Postfix. %prep %setup -q -%if %{with vda} -cat %{SOURCE7} | %{__patch} -p1 -s -cat %{SOURCE11} | %{__patch} -p1 -s -%endif find -type f | xargs sed -i -e 's|/etc/postfix|/etc/mail|g' @@ -280,9 +269,6 @@ sed -i '/scache_clnt_create/s/server/var_scache_service/' src/global/scache_clnt %patch9 -p1 %patch10 -p1 %patch11 -p1 -%if %{with vda} -%patch12 -p1 -%endif %if %{with tcp} sed -i 's/ifdef SNAPSHOT/if 1/' src/util/dict_open.c -- 2.44.0