Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.lock mailbox

Status
Not open for further replies.

gelboe

Programmer
Nov 15, 2004
7
GB
Hi,

I have a pop3 mail box setup on freebsd. I can no longer connect to it to collect my mail and having looked on the server under the su account:

/var/mail/

on listing the contents the following appears:

mymailboxname
mynailboxname.lock

The mailbox has obviously been locked perhaps due to it reaching full capacity. Can anyone please advise on why this has occured and how it is best resolved.

I am fairly new to FreeBSD so any help would be greatly appreciated.

Thanks in advance

Gelboe
 
The lock file is created when a pop3 client connects to the server. For some reason, the process probably didn't terminate cleanly, thus the lockfile was never cleaned up on client disconnect. Simply delete the lock file.
 
Hi thanks for your help.

I see how the lock file operates now. However I think the mail box for the "myMailBox" account is full and I need to delete a number of messages form this mailbox.

I cannot login to the user account using SSH, I am using Putty for Windows and a soon as I enter the password for this freebsd account, Putty exits and the connection to the server is lost.

When I login with an admin account "carly" and switch to the SU account and run "mail" I can only see mail messages for the admin account "carly". How do I access the mail box for "myMailBox", (the one i wish to delete messages from).

Any further help would be great!

Thanks in advance for your time

Gelboe
 
Option 1: when you su, use "su -" to load the profile of the user in question. mail, elm, pine, whatever should then open the user's mailbox.

Option 2: use the "mail" program with either the -f or -u option to open a user's mailbox. Example, "mail -f /var/mail/username" or "mail -u username".

Option 3: make sure your POP3 client is configured to delete messages from the mailbox after downloading them, then retrieve the messages in question.

I find it odd that you think the mailbox is "full." Unless the partition is out of disk space (or the user doesn't have enough quota on that partition) that should never happen. Mailbox files are just text files and can essentially grow without limit.
 
Hi,

Thanks for this, it is all really helpful stuff.

The only reason I think that the mailbox/allocated disk space is full is because the user of the mailbox has not ever! deleted a mail message from this box because they had not performed the action you described in Option 3 in your post.

I have tried to execute "mail -u username" and i got:

/: write failed, file system is full
/tmp: No space left on device

what would suggest i do?

can i just delete the mailbox "mymailboxname" from /var/mail/mymailboxname and then recreate a new(empty) version of it?

if so what is the syntax i need to do this?


thanks for all your help

Gelboe
 
Ouch.

Yep, it looks like the filesystem is full--and assuming you ran that as root, even that small amount of disk space normally reserved for root has been used as well. I'm curious as to how you have those disks partitioned given that / and /tmp are reported as being out of disk space in the output you posted.

Yes, you can simply delete the mailbox file. You do not need to recreate it, it will automatically do so when mail is next received for the user. The bad news here is that assuming the filesystem is full, you haven't been receiving mail at all for however long this condition has existed.

To prevent this from happening again in the future, I suggest you seriously consider implementing a quota policy.
 
Yeh, Ouch!

The server and the accounts were setup by another administrator, I have recently taken over the server so I am not farmiliar with the disk usage and quota situation but I will take some time to sort it now i think.

I have deleted the mailbox and all is well again.

Thanks so much for your time, you've been a real help!

Kind Regards

Gelboe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top