/usr/tmp/.pop/{username} HELP!

Posted on 1998-10-26
Last Modified: 2013-12-05
Anyone familiar with this problem?  Users mail files are appearing in the directory /usr/tmp/.pop directory when not reading email, and can't read their email again until this file has been deleted.  How can I make this problem go away?

Using Slackware 3.5
Kernel 2.0.35
pop3 server that comes with slackware 3.5

Question by:Q010797
  • 3
  • 2

Expert Comment

ID: 1638360
POP3 email works as follows:

1)  machine receives a request to read / retrieve mail

2)  a copy of the user's mail file, ie. /usr/spool/mail/USERID is copied to some other file
     on the mail server, in some cases, it's /usr/spool/mail/USERID.pop, but it can
     potentially be something else..

3)  a POPPER session is established on the machine, and the .pop file is transfered
     down to the user..  meanwhile, new mail goes to the normal /usr/spool/mail files
     so it's available (and not lost) during the next pop cycle..

4)  after successful completion of the download of the .pop file, it's deleted from the
     system, (or recopied to the original if LEAVE MAIL ON SERVER is selected).. and the
     system POPPER process terminates..

if the files you're seeing remain on the server, the problem you're seeing is that users aren't successfully transferring their mail.. the end result is that when they try again, the system sees an existing process and throws it's hands in the air and says "you're already receiving mail, why try again..."  and fails..

to fix the problem, look for exisiting POPPER processes on the machine and kill them..
and recopy the .pop files to the users /usr/spool/mail/ file, appending it if needed (due to new mail since the process was attempted)..  remember to delete or rename the .pop files

if the problem persists after you've made the above corrective actions, then you need to look at the links between the client machines and your server..  

 good luck


Author Comment

ID: 1638361
I am aware of ALL of the above,  There are no pop processing running however, when the problem occurs.  I don't need to copy it back over /var/spool/mail/{username} as it is still ALL there.

I want to fix this problem permanently and not do what I am doing now (when someone complains, I delete it!)

it never had this problem with slackware 3.2, I got it first with slackware 3.4 and someone said, upgrade to 3.5, which I did at no advantage.

Is there a FIX for this problem?


Accepted Solution

fmismetti earned 200 total points
ID: 1638362
I had this problem before. After some research I found this Ian Kinner that wrote the following script:

## 8-1-97 Ian Kinner (
## Simple sh script to remove stale files left in the in.pop3d tmp
## directory, which cause DoS for POP3 users. Should be run by a contab
## every 15 minutes or so.

# Logfile to write deletions: (/dev/null valid)

# in.pop3d tmp directory:

ls -l $TMPDIR | awk '{print $9}' >/tmp/.usrtmp
NUMBER=`wc -l /tmp/.usrtmp | awk '{print $1}'`

while [ $NUMBER -gt 1 ]
USER=`head -$NUMBER /tmp/.usrtmp | tail -1`
ps aux | grep in.pop3d | grep $USER >/tmp/.poptmp
SIZE=`ls -l /tmp/.poptmp | awk '{print $5}'`
if [ $SIZE -eq 0 ] ; then
  echo `date` -- removed stale file for: $USER >> $LOGFILE
  rm -f $TMPDIR/$USER
TMP=`expr $NUMBER - 1`
rm -f /tmp/{.poptmp,.usrtmp}

END SCRIPT======================

Then I put the following line in root crontab file:

0,15,30,45 * * * * /usr/local/bin/ > /dev/null

So, every 15 minutes the script handles an eventual dead lock file. I never had problems again. Try it and let me know the results

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Author Comment

ID: 1638363
It's not quite an ANSWER but if it just can't be fixed then so be it.  It never used to happen with slackware 3.2 but I get it all the time with slackware 3.4 or 3.5.

Not tried 3.6 yet.

Expert Comment

ID: 1638364

I agree that it's not a real answer but it works.

Also, I had this problem first time with slackware 3.2. In fact I think it's a problem in pop3d daemon. I download the source code for the latest pop3d daemons, compile and install -- and the problem was not solved. It's possible to comment out from the source code the test for this file -- but I think that this will introduce a more nasty problem, specially if the same pop client tries to log on at the same time.


Author Comment

ID: 1638365
I agree.. thank you for your help

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question