Hi people (Matt especially :]),

I've included a patch against vpopmail's current SVN trunk. It fixes a wrong comparison of the quota, which makes domains with a quota almost directly deny the message, since it believes the domain is over qutoa.

The quota listed in the vlimit is in megabytes (well, mibi to be exact). The fix is quite trivial.

It also includes a missing `+OK' response (okay, a missing `wait_write()') in vpopmaild - when there was no such alias.

--
Kind regards,
Harm van Tilborg


!DSPAM:4ab273ee32711076378410!
Index: quota.c
===================================================================
--- quota.c     (revision 939)
+++ quota.c     (working copy)
@@ -115,7 +115,7 @@
          Compare
    */
 
-   if (((vl.diskquota) && (bytes >= vl.diskquota)) || ((vl.maxmsgcount) && 
((count >= vl.maxmsgcount))))
+   if (((vl.diskquota) && (bytes >= (vl.diskquota * 1000000))) || 
((vl.maxmsgcount) && ((count >= vl.maxmsgcount))))
          return 1;
 
    return 0;
@@ -228,7 +228,7 @@
    */
 
    if ((ret) && (usage != -1)) {
-         if (((vl.diskquota) && (usage >= vl.diskquota)) || (((vl.maxmsgcount) 
&& (count >= vl.maxmsgcount))))
+         if (((vl.diskquota) && (usage >= (vl.diskquota * 1000000))) || 
(((vl.maxmsgcount) && (count >= vl.maxmsgcount))))
                 return 2;
    }
 
Index: vpopmaild.c
===================================================================
--- vpopmaild.c (revision 939)
+++ vpopmaild.c (working copy)
@@ -2031,6 +2031,7 @@
     tmpalias = valias_select(Alias, Domain);
     if (tmpalias == NULL) {
       snprintf(WriteBuf, sizeof(WriteBuf), RET_OK);
+         wait_write();
     } else {
       snprintf(WriteBuf, sizeof(WriteBuf), RET_OK_MORE);
       wait_write();

!DSPAM:4ab273ee32711076378410!

Reply via email to