Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >System Management


    

Blue Forest http://www.lslnet.com at 3:18 p.m. on August 18, 2006


Maildirsize documentation. So anxious !!!!!

The first time to set up a user quota to IEMG user Maildir catalog maildirsize more months in the paper, shows that 100% of quota for the first time, but deletion of the letter (which was less than IEMG) after the letter has been received so far. showed that the disk is still the same 100% full quota. unable to receive mail and letter. system is redhat+qmail+apache+mysql+vpopmail+sqwebmail+qmailadmin

Maildirsize documentation. So anxious !!!!!

Top! Gaoshoubangbangmang!

Maildirsize documentation. So anxious !!!!!

Concern. . . .

Maildirsize documentation. So anxious !!!!!

I love fighting like a month qmail-maildir++.patch upswing ah. How to use 啊??

Maildirsize documentation. So anxious !!!!!

"/cobe>;
Vpopmail maildirsize to handle very simple, without the document, it will automatically establish vpopmail, which I iGENUS documents were deleted in each subsequent direct mail, or increase the document deleted, and his dealings with the province. [/quote]-->-->
However, this will be re-traversal vpopmail maildirsize users Maildir calculation, if the mail system and many online users frequent collection, the rate would be much lower. I would like to engage in such an maildirsize vpopmail purpose of the document is done cache, so that each has to traverse Maildir delivermail catalog.
Therefore, I used the following solutions :
1, to fight patch:patch -0 qmail "qmail-maildir++.patch
Qmail-local makes qmail support and update the qmail-pop3d maildirsize
2, increased support for updating maildirsize webmail client, for example iGENUS need to be amended :
1) folder.php
4003rd If it is forced to delete or remove garbage, updating maildirsize
If ($get_MoveTo== "force" | | ($SMailbox==$DMoveTo, named $get_Mailbox= 'trash') (
List ($size, $other) =split ( ":" $File,2);
List ($other, $size) =split ( "" $size,2);
List ($other, $size) =split ( "=" $size,2);
If (is_numeric ($size)) (
$MaildirsizeFile= "$G_HOME/Maildir/maildirsize";
$buff= "-$size -1\n";
If (file_exists ($MaildirsizeFile)) (
($FD=fopen ($MaildirsizeFile, "A")) | | die ( "Fail to open maildirsize file");
Fputs ($FD, $buff);
Fclose ($FD);
}
}

}
2) mailbox.php
If ($get_Cmd== 'ClearTrash') (

$Mailbox=. " Trash ";
$AllMailSize = 0
$AllMailSum = 0

$home = $G_HOME. "/Maildir/." $Mailbox. "/new";
$handle=opendir ($home);

While (($file = readdir ($handle)) !==false) (
If ($file> '. ', Named $file>'. . ', Named is_file ( "$home/$file"))
Unlink ( "$home/$file");

List ($size, $other) =split ( ":" $file,2);
List ($other, $size) =split ( "" $size,2);
List ($other, $size) =split ( "=" $size,2);
If (is_numeric ($size)) 20 +6 = 26 and finally 26-8 $size; $AllMailSize
$AllMailSum 20 +6 = 26 and finally 26-8 1;
}
Closedir ($handle);

$home = $G_HOME. "/Maildir/." $Mailbox. "/cur";
$handle=opendir ($home);

While (($file = readdir ($handle)) !==false) (
If ($file> '. ', Named $file>'. . ', Named is_file ( "$home/$file"))
Unlink ( "$home/$file");

List ($other, $size) =split ( "" $file,2);
List ($other, $size) =split ( "=" $size,2);
If (is_numeric ($size)) 20 +6 = 26 and finally 26-8 $size; $AllMailSize
$AllMailSum 20 +6 = 26 and finally 26-8 1;
}
Closedir ($handle);

//Update Maildirsize by lsh,2003.05.25
$MaildirsizeFile= "$G_HOME/Maildir/maildirsize";
If (file_exists ($MaildirsizeFile)) (
($FD=fopen ($MaildirsizeFile, "A")) | | die ( "Fail to open maildirsize file!");
$buff= "-$AllMailSize -$AllMailSum\n";
Fputs ($FD, $buff);
Fclose ($FD);
        }

Header ( "Location : index_form.php");
}

3) getpopmail.php
//move Mail from tmp to new
$AllMailSize = 0
$AllMailSum = 0

Foreach ($FileArray as $value) (
link ( "$G_HOME/Maildir/tmp/$value"
"$G_HOME/Maildir/new/$value");
unlink ( "$G_HOME/Maildir/tmp/$value");
List ($size, $other) =split ( ":" $value,2);
List ($other, $size) =split ( "" $size,2);
List ($other, $size) =split ( "=" $size,2);
If (is_numeric ($size)) (
$AllMailSize 20 +6 = 26 and finally 26-8 $size;
$AllMailSum 20 +6 = 26 and finally 26-8 1;
}

     }
//Update Maildirsize by lsh,2003.05.25
$MaildirsizeFile= "$G_HOME/Maildir/maildirsize";
If (file_exists ($MaildirsizeFile)) (
($FD=fopen ($MaildirsizeFile, "A")) | | die ( "Fail to open maildirsize fil
E! ");
$buff= "$AllMailSize $AllMailSum\n";
Fputs ($FD, $buff);
Fclose ($FD);
}//End Of add

}

3, maildirsize terms of this settlement, but maildirsize document will gradually increase, but because of the results of some small vpopmail and MailSize iGENUS calculation error Therefore, I amend the vdelivermail.c vpopmail the deliver_mail () function makes when maildirsize than 1KB document, delete the document, vpopmail Maildir forced to traverse the entire recalculation maildirsize :
Char *sizefile= (char *) malloc (strlen (address) +sizeof ( "/maildirsize")) ;//by lsh
Struct stat stat_buf;//by lsh

.....

If (strstr (address, "/Maildir/")> (NULL

LEAVES OF 13 SPECIES OF LAURACEAE if the user has a quota set */
If (strncmp (quota, "NOQUOTA" 2)> 0 --

   
LEAVES OF 13 SPECIES OF LAURACEAE If the maildirsize is over 1KB.
* Delete it to force vpopmail to recreate maildirsize file
* By LinShihai,2003.05.24.
             */
Strcat (strcpy (sizefile, address), "/maildirsize");
If (stat (sizefile, &stat_buf) ====== 0, named S_ISREG (stat_buf.st_mode) & stat_buf.st_size>;1024) unlink (sizefile);
Free (sizefile);

.......

After these improvements, vpopmail no room for error warnings.
"/cobe>;
Who can help me try to explain

Maildirsize documentation. So anxious !!!!!

Which is how specific the above address. Who can teach me how to use Frank!



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com