Dealing with Orphaned queue files info at
Fri Sep 22 10:09:49 IST 2006

I had the same problem, 

I wrote a script which stops sendmail and mailscanner
then checks for qf files without df files, and rename them
and check for df files without qf files, and rename them,

start mailscanner again, queue stays nicely clean.

As i understand from Julians notes its safe to remove these files,


-----Oorspronkelijk bericht-----
Van: Jim Holland [mailto:mailscanner at]
Verzonden: vrijdag 22 september 2006 9:47
Aan: MailScanner discussion
Onderwerp: Re: Dealing with Orphaned queue files

On Fri, 22 Sep 2006, James Gray wrote:

> On 22/09/2006, at 12:50 PM, Errol Neal wrote:
> > I'm running mailscanner-4.54.6-1 on centos. Sendmail 8.13.6
> > I'm seeing a lot of orphaned queue files in /var/spool/
> > can I prevent from happening?
> Despite having the correct lock type in my sendmail boxes, I still  
> seem to accumulate a few of these from time to time.  Usually when  
> the system is under heavy load.  My solution was simply to write a  
> script that hosed any queue files older than 5 days.  Less than that  
> is dangerous as sendmail usually retries messages for four days - if  
> you clean out queue files that are <5 days, you risk loosing  
> legitimate messages.
> Not a "clean" solution, but functional enough for more purposes.

If the file has not been modified for more than an hour then it is
unlikely that the sending server will still have that connection active
(with sendmail the default data timeout for sending is 1 hour, for
example), and even if it is the chances of it being completed
are remote.  So what I do with any queue file more than an hour old is
first to check if there is an associated sendmail process, and if there
is, kill that, then delete the file.  That should be perfectly safe.

There is one exception that I can think of, and that is when some 
braindead system (such as Yahoo, Gmail etc) does not use the ESMTP SIZE 
extension, so with low bandwidth like ours it could take a couple of
to send us one of their 15 MB files while at our end we will just see an

apparently dead queue file that hits the maximum size limit we have set 
(1.5 MB) and then never gets larger and so doesn't get modified.
the process and deleting the file would just cause them to resend, 
starting the whole problem all over again.  So for the moment I don't 
automate this - in such cases I first blacklist the server, then kill
file, then remove the blacklisting once I see that the server has made a

further connection attempt and been rejected.  Very annoying, and a 
problem that I can't see a solution to for the moment.


Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service

MailScanner mailing list
mailscanner at

Before posting, read

Support MailScanner development - buy the book off the website! 


Scanned for virus and spam


Scanned for virus and spam

More information about the MailScanner mailing list