Solved

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

Posted on 1998-10-26
6
398 Views
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

ideas?
0
Comment
Question by:Q010797
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:tfabian
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





 
0
 
LVL 1

Author Comment

by:Q010797
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?

Andrew
0
 
LVL 1

Accepted Solution

by:
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:

BEGIN SCRIPT=======
#!/bin/sh
##
## 8-1-97 Ian Kinner (ian@llc.net)
##
## 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)
LOGFILE=/var/adm/flushpop_log

# in.pop3d tmp directory:
TMPDIR=/usr/tmp/.pop



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

while [ $NUMBER -gt 1 ]
do
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
fi
TMP=`expr $NUMBER - 1`
NUMBER=$TMP
done
rm -f /tmp/{.poptmp,.usrtmp}

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

Then I put the following line in root crontab file:

0,15,30,45 * * * * /usr/local/bin/rm_stale.sh > /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






0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Author Comment

by:Q010797
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.
0
 
LVL 1

Expert Comment

by:fmismetti
ID: 1638364
Q:

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.

 
0
 
LVL 1

Author Comment

by:Q010797
ID: 1638365
I agree.. thank you for your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now