Thanks Mark for the very useful explanation. How can I get hold of this 
script you mention?
But as my earlier posting indicated, in this particular case there are 
no lock files (.username) present in /var/spool/mail. I am still at 
square 1. I'll do these changes after sorting out this problem.

> [EMAIL PROTECTED] wrote:
> > Use ls -al
> > and check for the file under the name /var/spool/mail/.username
> 
> Yes, it could be that the user's spool file locked while 
reading/writing new
> mail data. Usually, mail stored in 'mbox' format will create lock 
files
> (very bad, very slow). My suggestion is that you move your mail 
storage
> format from 'mbox' to Maildir/.
> 
> Maildir/ mail storage format is the same way Eudora stores its mail 
on a
> client machine. MS Outlook, Netscape Mail, e.t.c, mimic the 'mbox' 
format.
> With Maildir/, each mail is stored as a single file - this means mail 
can be
> quickly accessed, and no .lock files are created when the spool file 
is
> accessed for read/write i/o.
> 
> If you are interested in this format, there are 3 things you'd need 
to do:
> 
>       o First, convert all your existing 'mbox' mail to Maildir/. This
> will read your 'mbox' spool file, and break each 
>         message up into separate files. I have a script that will do 
this.
> The script will read all users in the
>         /etc/passwd file, access their /var/spool/mail/username files 
and
> convert each mail into a single file. The script
>         will then create a ~user/Maildir/ directory in the user's home
> directory as specified by the 'homedir' variable for
>         the user in the '/etc/passwd' file.
> 
>       o Now that the user's existing mail has taken on a Maildir/ 
storage
> format, you will need to tell your MTA to deliver
>         mail to the user's home directory in Maildir/ format, and not
> 'mbox' format. From the last time I checked, Postfix
>         and Exim can do this with some extra configuration. IIRC, 
Sendmail
> could be patched to support Maildir/ dropping.
>         Alternatively, you can call an MDA to do the delivery e.g.
> maildrop, procmail, smtp.pl, e.t.c.
> 
>       o The third thing to do now is to be able to read the mail. 
Unlike
> 'mbox' format mail, Maildir/ files aren't just
>         readable in such a straightforward manner. For those who love
> Pine, I believe a patch is available to read Maildir/
>         files; otherwise, Mutt is the most preferred command line MUA 
for
> reading/handling Maildir/ files. I am not sure
>         of the KDE-based MUA's as I haven't tried them, but you could 
do
> your experiments. As usual, Google is your friend.
> 
> > 
> > 
> > On Apr 24, 2004, at 10:16 AM, Lule George William wrote:
> > 
> >> Hello all,
> >> Something strange has just happened. A user has just lost all his
> >> mails, over 32MB of them!!! When I check /var/spool/mail/username, 
I
> >> find that only 12k is left. I am sure he didn't delete them because
> >> he needs all of them, what do you think happened? Is there a chance
> >> of retrieving any? System: SuSE Linux 7.2, kernel 2.4.4-4GB, 40GB
> >> Hard disk and 512 RAM. Neomail is the MUA. 
> >> 
**********************************************************************
> >> * *
> >> Lule George William (Mr)
> >> Network and Systems Administrator
> >> Uganda Martyrs University, Nkozi
> >> P.O. Box 5498 Kampala
> >> Uganda
> >> 
> >> 
> >> ---------------------------------------------
> >> This service is hosted on the Infocom network
> >> http://www.infocom.co.ug 
> >> 
> >> 
> > 
> > ****************                   *****************************
> > Kiggundu Mukasa                # Computer Network Consultancy###
> > KYM-NET LTD.                   # Intranets & Internet Solutions#
> > Plot 80 Kanjokya Street
> > P.O. Box 24284 Kampala, Uganda
> > Tel:     +256 77 972255
> >           +256 71 221141
> > Fax:     +256 31 262122
> > *****************************************************************
> > 
> > 
> > 
> > ---------------------------------------------
> > This service is hosted on the Infocom network
> > http://www.infocom.co.ug
> 
> Regards,
> 
> Mark Tinka
> Technical Manager, Africa Online Swaziland
> 
> 
> 
> ---------------------------------------------
> This service is hosted on the Infocom network
> http://www.infocom.co.ug
> 
> 

************************************************************************
Lule George William (Mr)
Network and Systems Administrator
Uganda Martyrs University, Nkozi
P.O. Box 5498 Kampala
Uganda


---------------------------------------------
This service is hosted on the Infocom network
http://www.infocom.co.ug

Reply via email to