?
Solved

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

Posted on 1998-10-26
6
Medium Priority
?
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

771 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