#102680 courier-base: Maildir quota compatible with Exim MTA

Package:
courier-base
Source:
courier
Description:
Courier mail server - base system
Submitter:
Piotr Roszatycki
Date:
2026-05-14 01:32:02 UTC
Severity:
wishlist
#102680#5
Date:
2001-06-28 12:24:05 UTC
From:
To:
The Courier-IMAP server has maildirquota feature which is not compatible
with Exim MTA. The easier way is to make a workaround for Courier than
implement maildirsize file for Exim. This patch provides a new option to
/etc/courier/authldaprc file, i.e.:

NO_MAILDIRSIZE		1

This causes the Courier ignores maildirsize option and recalculate the
quota all the time.

The patch was sent to courier-users and is not applied to main source yet.


diff -ru2b courier-0.34.0.orig/maildir/maildirgetquota.c courier-0.34.0/maildir/maildirgetquota.c
--- courier-0.34.0.orig/maildir/maildirgetquota.c	Mon Feb 14 06:11:39 2000
+++ courier-0.34.0/maildir/maildirgetquota.c	Thu Jun 28 13:45:35 2001
@@ -18,4 +18,5 @@
 {
 char	*p;
+char	*nomaildirsize;
 struct	stat	stat_buf;
 int	n;
@@ -32,4 +33,13 @@
 		free(p);
 		return (n);
+	}
+
+	nomaildirsize=getenv("NO_MAILDIRSIZE");
+	if (nomaildirsize && atoi(nomaildirsize) == 1)
+	{
+		free(p);
+		p=getenv("MAILDIRQUOTA");
+		strcpy(buf, p);
+		return (0);
 	}

diff -ru2b courier-0.34.0.orig/maildir/maildirquota.c courier-0.34.0/maildir/maildirquota.c
--- courier-0.34.0.orig/maildir/maildirquota.c	Mon Dec 25 20:47:57 2000
+++ courier-0.34.0/maildir/maildirquota.c	Thu Jun 28 13:45:35 2001
@@ -213,4 +213,5 @@
 char	*checkfolder=(char *)malloc(strlen(dir)+sizeof("/maildirfolder"));
 char	*newmaildirsizename;
+char	*nomaildirsize;
 struct stat stat_buf;
 int	maildirsize_fd;
@@ -237,4 +238,7 @@
 	if (!quota_type || !*quota_type)	return (0);

+	nomaildirsize=getenv("NO_MAILDIRSIZE");
+	if (nomaildirsize && atoi(nomaildirsize) != 1)
+	{
 	strcat(strcpy(checkfolder, dir), "/maildirsize");
 	time(&tm);
@@ -257,4 +261,5 @@
 			return (n);
 	}
+	}

 	maxtime=0;
@@ -292,4 +297,8 @@
 	}

+	if (nomaildirsize && atoi(nomaildirsize) == 1)
+		return (qcalc(maildirsize_size+xtra_size, maildirsize_cnt+xtra_cnt,
+			quota_type, percentage));
+
 	newmaildirsizename=makenewmaildirsizename(dir, &maildirsize_fd);
 	if (!newmaildirsizename)
@@ -371,4 +380,10 @@
 	const char *quota_type, long maildirsize_size, int maildirsize_cnt)
 {
+	char *nomaildirsize;
+
+	nomaildirsize=getenv("NO_MAILDIRSIZE");
+	if (nomaildirsize && atoi(nomaildirsize) == 1)
+		return (0);
+
 	if (!quota_type || !*quota_type)	return (0);
 	return (doaddquota(dir, maildirsize_fd, quota_type, maildirsize_size,

#102680#10
Date:
2026-05-14 01:31:09 UTC
From:
To:
I have recently taken over maintenance of the courier packages.  I apologize
that nobody responded to this bug report.  Can you confirm if this is still a
problem with the current version of courier-base (1.5.1-3)?

#102680#13
Date:
2026-05-14 01:31:09 UTC
From:
To:
I have recently taken over maintenance of the courier packages.  I apologize
that nobody responded to this bug report.  Can you confirm if this is still a
problem with the current version of courier-base (1.5.1-3)?