LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2008, 05:25 AM   #1
bittus
Member
 
Registered: Aug 2006
Posts: 153

Rep: Reputation: 15
Mailbox lock not getting removed


Hi,

I am using postfix 2.5.1 on fc8.

Everything was working fine till now. One fine morning, i saw repeated mails in my inbox. Had a look into the server and found that the problem is due to another user's mailbox and the mails are getting repeated due to locking problem. Mails got repeated to all users who had been included in the alias of this user.

In the mailq, I could see a long list of mails waiting to be sent to this user with a message
"cannot access mailbox /var/mail/XXXX for user XXXX. unable to create lock file /var/mail/XXXX.lock: File exists"

I googled and found in some forums that the problem will get rectified once the lock file gets removed. So I tried removing the lock file and flushing the queue. Still no luck . . . . .

Can anyone help me postmortem this and rectify the problem ?

The output of lsof | grep XXXX , when the lock is valid is :

Quote:
[root@MYHOST~]# lsof | grep XXXX
local 27104 XXXX cwd DIR 253,0 4096 33292703 /var/spool/postfix
local 27104 XXXX rtd DIR 253,0 4096 2 /
local 27104 XXXX txt REG 253,0 827552 1771313 /usr/libexec/postfix/local
local 27104 XXXX mem REG 253,0 50768 19267692 /lib/libnss_files-2.7.so
local 27104 XXXX mem REG 253,0 109580 19269120 /lib/libnsl-2.7.so
local 27104 XXXX mem REG 253,0 84772 19269122 /lib/libresolv-2.7.so
local 27104 XXXX mem REG 253,0 128952 19269106 /lib/ld-2.7.so
local 27104 XXXX mem REG 253,0 1692524 19269107 /lib/libc-2.7.so
local 27104 XXXX mem REG 253,0 20564 19269108 /lib/libdl-2.7.so
local 27104 XXXX mem REG 253,0 131528 19269109 /lib/libpthread-2.7.so
local 27104 XXXX mem REG 253,0 45316 19269131 /lib/libcrypt-2.7.so
local 27104 XXXX mem REG 253,0 99092 1043829 /usr/lib/libsasl2.so.2.0.22
local 27104 XXXX mem REG 253,0 1319560 19269130 /lib/libdb-4.6.so
local 27104 XXXX 0u CHR 1,3 207 /dev/null
local 27104 XXXX 1u CHR 1,3 207 /dev/null
local 27104 XXXX 2u CHR 1,3 207 /dev/null
local 27104 XXXX 3r FIFO 0,6 107268248 pipe
local 27104 XXXX 4w FIFO 0,6 107268248 pipe
local 27104 XXXX 5u unix 0xf721f000 107268174 socket
local 27104 XXXX 6u unix 0xf721fc00 107268171 private/local
local 27104 XXXX 7u unix 0xf5ee8c00 107268271 socket
local 27104 XXXX 8u REG 253,0 0 33295053 /var/spool/postfix/pid/unix.local
local 27104 XXXX 9u 0000 0,7 0 22 anon_inode
local 27104 XXXX 10r REG 253,0 12288 32670001 /etc/postfix/aliases.db
local 27104 XXXX 11r REG 253,0 12288 32670001 /etc/postfix/aliases.db
local 27104 XXXX 12u 0000 0,7 0 22 anon_inode
local 27104 XXXX 13u unix 0xf5ee8e00 107268277 private/local
local 27104 XXXX 14uR REG 253,0 4284 16220161 /var/spool/postfix/active/296F3F78001
local 27104 XXXX 15u unix 0xd9710e00 107268278 socket
local 27104 XXXX 16u IPv4 107268311 UDP *:43882
local 27105 XXXX cwd DIR 253,0 4096 33292703 /var/spool/postfix
local 27105 XXXX rtd DIR 253,0 4096 2 /
local 27105 XXXX txt REG 253,0 827552 1771313 /usr/libexec/postfix/local
local 27105 XXXX mem REG 253,0 50768 19267692 /lib/libnss_files-2.7.so
local 27105 XXXX mem REG 253,0 109580 19269120 /lib/libnsl-2.7.so
local 27105 XXXX mem REG 253,0 84772 19269122 /lib/libresolv-2.7.so
local 27105 XXXX mem REG 253,0 128952 19269106 /lib/ld-2.7.so
local 27105 XXXX mem REG 253,0 1692524 19269107 /lib/libc-2.7.so
local 27105 XXXX mem REG 253,0 20564 19269108 /lib/libdl-2.7.so
local 27105 XXXX mem REG 253,0 131528 19269109 /lib/libpthread-2.7.so
local 27105 XXXX mem REG 253,0 45316 19269131 /lib/libcrypt-2.7.so
local 27105 XXXX mem REG 253,0 99092 1043829 /usr/lib/libsasl2.so.2.0.22
local 27105 XXXX mem REG 253,0 1319560 19269130 /lib/libdb-4.6.so
local 27105 XXXX 0u CHR 1,3 207 /dev/null
local 27105 XXXX 1u CHR 1,3 207 /dev/null
local 27105 XXXX 2u CHR 1,3 207 /dev/null
local 27105 XXXX 3r FIFO 0,6 107268248 pipe
local 27105 XXXX 4w FIFO 0,6 107268248 pipe
local 27105 XXXX 5u unix 0xf721f000 107268174 socket
local 27105 XXXX 6u unix 0xf721fc00 107268171 private/local
local 27105 XXXX 7u unix 0xed0dc400 107268280 socket
local 27105 XXXX 8u REG 253,0 0 33295053 /var/spool/postfix/pid/unix.local
local 27105 XXXX 9u 0000 0,7 0 22 anon_inode
local 27105 XXXX 10r REG 253,0 12288 32670001 /etc/postfix/aliases.db
local 27105 XXXX 11r REG 253,0 12288 32670001 /etc/postfix/aliases.db
local 27105 XXXX 12u 0000 0,7 0 22 anon_inode
local 27105 XXXX 13u unix 0xed0dc200 107268286 private/local
local 27105 XXXX 14uR REG 253,0 4270 16220165 /var/spool/postfix/active/E89D8F78005
local 27105 XXXX 15u unix 0xf5ee8200 107268287 socket
local 27105 XXXX 16u IPv4 107268306 UDP *:43880
[root@MYHOST ~]#
 
Old 11-18-2008, 05:38 AM   #2
bittus
Member
 
Registered: Aug 2006
Posts: 153

Original Poster
Rep: Reputation: 15
Some mails in the queue bear a different message :

(cannot access mailbox /var/mail/XXXX for user XXXX. unable to lock for exclusive access: Resource temporarily unavailable)
 
Old 11-18-2008, 05:39 AM   #3
osamaensyviswinkel
LQ Newbie
 
Registered: Sep 2007
Location: Stellenbosch, South Africa
Distribution: Ubuntu 12.10 at home, Mac OS X on laptop
Posts: 20

Rep: Reputation: 0
fuser -k mailbox

for example

fuser -k /var/spool/mail/john
 
Old 11-19-2008, 05:52 AM   #4
bittus
Member
 
Registered: Aug 2006
Posts: 153

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by osamaensyviswinkel View Post
fuser -k mailbox

for example

fuser -k /var/spool/mail/john
Thanks a lot buddy for the information.

will check this next time i need
 
Old 11-20-2008, 12:38 AM   #5
osamaensyviswinkel
LQ Newbie
 
Registered: Sep 2007
Location: Stellenbosch, South Africa
Distribution: Ubuntu 12.10 at home, Mac OS X on laptop
Posts: 20

Rep: Reputation: 0
my pleasure!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 17 07-12-2016 02:50 AM
all software installs hang scroll lock and caps lock lights flash jcorrnt Linux - Hardware 6 02-07-2009 12:44 PM
CYRUS - How to export a user's mailbox to another user's mailbox ? CSA74 Linux - Server 2 01-10-2008 05:39 PM
Removed .lock files in /etc, now user folders missing ews208 Linux - Server 6 08-22-2007 01:53 PM
Cant Get Lock Mailbox In Use Error psychguy Linux - Software 1 06-01-2005 05:43 PM


All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration