Solved

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

Posted on 1998-10-26
6
393 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

708 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

20 Experts available now in Live!

Get 1:1 Help Now