Sponsored Content
Full Discussion: /var/mail/$LOGINNAME.lock
Top Forums UNIX for Advanced & Expert Users /var/mail/$LOGINNAME.lock Post 302560631 by ungalnanban on Friday 30th of September 2011 11:30:27 AM
Old 09-30-2011
/var/mail/$LOGINNAME.lock

I'm not able to view my inbox mails, I'm using Thunderbird.
I have checked the /var/mail/ directory files. There I saw the lock file. [username.lock] .
I have removed the lock file and restarted the Thunderbird, again the lock file is created.
I have changed the file group as mail from users. after that also the lock file is created. and
I have restarted the machine. After re-booted the machine the file group has changes to users.
Code:
-rw------- 1 sugumar        users   1.4G 2011-09-30 20:14 sugumar
-rw------- 1 sugumar        mail     10 2011-09-30 20:30 sugumar.lock

I'm not able to stop the lock file creations. I'm not able to access my inbox.
What is the problem ? How to solve this?


Thanks in advance for helping me.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Files still being created in /var/spool/mmdf/lock/home

Hi all I need help finding a process that is continuing to create files in the above area. There are three sub folder titled addr q.local and msg . I have already found a process called mmdf running and have used the kill command to stop this from running. I have also looked for sendmail or... (12 Replies)
Discussion started by: TeaMaker
12 Replies

2. Shell Programming and Scripting

READING mail from /var/mail/user

Hello guys, I'm in desperate need. I need to write a script that behaves like a "mail" shell program. I've a base of the program -menu and so on, but what I cannot do is how to read messages from /var/mail/user. I would like to separate them as "mail" program does, but I;m just a newbie and... (21 Replies)
Discussion started by: petoSVK
21 Replies

3. UNIX for Dummies Questions & Answers

Can I zero var/spool/mail/mail

The mail file in the directory var/spool/mail is very large. Can I zero this (>) without losing any unopened mails there may be? There are about 10 mail accounts. Using RedHat Linux. Thanks in advance. (0 Replies)
Discussion started by: dennisheazle
0 Replies

4. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

5. UNIX for Dummies Questions & Answers

How do I read mail in /var/spool/mail?

How can I read mail sent to /var/spool/mail? I do not have pine installed so forget about that...is there some generic utility I can use? (3 Replies)
Discussion started by: mojoman
3 Replies

6. UNIX for Dummies Questions & Answers

/var/spool/mail

Hi, How can i get my mail on either /var/spool/mail or /var/mail? I use mail and sendmail command to send mail. But everytime I send mail it comes to my outlook inbox and when I check with mail command I get the message "No mail for siba". (Note siba is my user Id.) (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

7. UNIX for Dummies Questions & Answers

Parse /var/mail

Hi all... We have a box that receives a lot of incoming emails. I have a .procmailrc file that in turn invokes a python script, which process each of these incoming email. All is nice and good. However, before the .procmailrc and python script were in place, we still were receiving emails and... (0 Replies)
Discussion started by: khader69
0 Replies

8. Red Hat

/usr/sbin/crond: can't lock /var/run/crond.pid,

please tell pre-requisite steps to activate cron. i activated the cron but it not executing the script which i set in crontab entry.through root user i passed the service crond start it get start.but when i go to etc/init.d and passed crond stop command.it gets crond: can't lock /var/run/crond.pid,... (2 Replies)
Discussion started by: umair
2 Replies

9. UNIX for Advanced & Expert Users

Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied

Hi all, I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...). I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message. Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies

10. Linux

/var/lock/subsys permission denied for root

Hello I have simple line of code here: FILE *lockfp = fopen("/var/lock/subsys/processName", "w"); which is denied even running as root. The result is locking failed for the following reason: Permission denied How is this possible? Why is this happening? Thanks for your... (4 Replies)
Discussion started by: flagman5
4 Replies
MAILOCK(3)						     Linux Programmer's Manual							MAILOCK(3)

NAME
maillock, mailunlock, touchlock - manage mailbox lockfiles SYNOPSIS
#include <maillock.h> cc [ flag ... ] file ... -llockfile [ library ] int maillock( const char *user, int retrycnt ); void mailunlock( void ); void touchlock( void ); DESCRIPTION
The maillock function tries to create a lockfile for the users mailbox in an NFS-safe (or resistant) way. The algorithm is documented in lockfile_create(3). The mailbox is typically located in /var/mail. The name of the lockfile then becomes /var/mail/USERNAME.lock. If the environment variable $MAIL is set, and it ends with the same username as the username passed to maillock(), then that file is taken as the mailbox to lock instead. There is no good way to see if a lockfile is stale. Therefore if the lockfile is older then 5 minutes, it will be removed. That is why the touchlock function is provided: while holding the lock, it needs to be refreshed regulary (every minute or so) by calling touchlock () . Finally the mailunlock function removes the lockfile. RETURN VALUES
maillock returns one of the following status codes: #define L_SUCCESS 0 /* Lockfile created */ #define L_NAMELEN 1 /* Recipient name too long (> 13 chars) */ #define L_TMPLOCK 2 /* Error creating tmp lockfile */ #define L_TMPWRITE 3 /* Can't write pid int tmp lockfile */ #define L_MAXTRYS 4 /* Failed after max. number of attempts */ #define L_ERROR 5 /* Unknown error; check errno */ NOTES
These functions are not thread safe. If you need thread safe functions, or you need to lock other mailbox (like) files that are not in the standard location, use lockfile_create(3) instead. These functions call lockfile_create(3) to do the work. That function might spawn a set group-id executable to do the actual locking if the current process doesn't have enough priviliges. There are some issues with flushing the kernels attribute cache if you are using NFS - see the lockfile_create(3) manpage. FILES
/var/mail/user.lock, /usr/lib/liblockfile.so.1 AUTHOR
Miquel van Smoorenburg <miquels@cistron.nl> SEE ALSO
lockfile_create(3), lockfile_touch (3), lockfile_remove(3) Linux Manpage 28 March 2001 MAILOCK(3)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy