Question

Qmail Queue Filling up with NDR's

Asked by: Scottmanoh

My qmail server will occasionally get bloated with outbound messages.  A signal that this is happening is that when I send a message to "joe@abc.com" I will get an NDR from qmail saying that the message I sent to "sue@att.net" could not be delivered.  It's the exact message I sent to "joe@abc.com" and I did not include sue in the cc: or bcc: or anything like that.  I don't even know sue, nor do I have her in my contacts, etc etc.

I will get several of these NDR's for several addresses that I didn't put on the original email.  Then the queue bloats to huge numbers (thousands or tens of thousands) and legitimate outbound email is delayed for long periods of time, causing trouble for the business.

It's running on a BSD server.

How can I, a qmail novice, find out more about the root cause of this problem and put a stop to it?

Thanks for your time.
Scott

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-03 at 11:04:47ID24705478
Tags

qmail queue ndr

Topics

Qmail Email Server

,

Email Servers

,

Email Software

Participating Experts
3
Points
0
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. NDR Attacks
    My Exchange 2000 server is being hit with 3,000-5,000 NDR type of emails every day. By reading the various yet excelent posts here at EE, I have implemented the following steps: - Relaying is turned off and has been verified using telnet, ehlo, mail from, rcpt to etc. The ...
  2. Turning off NDRs stops BadMail directory from filling up
    I kid you not - this is really happening. My Exchange 2000 server is a heavy receiver of NDRs. It gets 3,000-5,000 per day. The Exchange box has had relay turned off for years and has never been a relayer but is simply a receiver of spoofed NDRs (all of the NDRs have fake ...
  3. Qmail ... NDR and RNDR
    Recently my server has started to receive what I believe to be RNDR (reverse non-delivery reports) which is a tactic that spammers use to get their junk read. I need to find some kind of solutions soon before It gets too out of hand. I am looking for either an open source scr...
  4. Hundreds of NDRs to legitimate email address from apparen…
    We have a user who is getting approximately 1 NDR/minute delivered to their Exchange mailbox from apparent SPAM messages not going to a legitimate email account. The bounces are from "Rolex..." and "Viagra..." subject-lined messages and sent to (usually) f...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ScottmanohPosted on 2009-09-03 at 12:09:17ID: 25253882

The queue has a bunch of mail in it with blank "From:" addresses also...

 

by: it4sohoPosted on 2009-09-04 at 07:40:27ID: 25260141

It sounds like your QMail support programs are having trouble with queue management -- specifically, they are not communicating correctly about entries made into the queue.

A little background:
 QMail is not some monolithic program (like sendmail) that does it all in one process thread. Rather, QMail is a collection of programs that communicate with each other to perform specific tasks. (It uses the original UNIX philosophy of making tools: make it do one thing, and do it well).
 One of the most important ways that QMail programs talk to each other is through the queue. In a nutshell though, the message headers and bodies are kept in different files. This way, when I send a message to 10,000 recipients I don't have to write the message body 10,000 times into the queue.

The most likely cause of the behavior you describe is a permissions issue -- either the queue folders don't have the correct permissions, or (more likely) one or more of the QMail programs isn't running with the right permissions (user/group ID).

To debug, we'll need to know the installation method used (who's set of instructions did you follow?). Also, a listing of the running processes (output of [options here are BSD options) ps -efwl). What we're looking for are the permissions on the queue itself, and the user IDs of the processes running QMail.

Or, you could use something like the QMail Toaster's QTP (QMail Toaster Plus) -- which has RPM installations for QMail and a variety of other packages that have a wide history of working well together. While I don't suspect that QMail Toaster (or QTP for that matter) has a BSD install script, you should be able to follow along and make it work on your BSD installation.


Just my thoughts...

Dan
IT4SOHO

 

by: ScottmanohPosted on 2009-09-04 at 08:38:37ID: 25260662

Thanks Dan,
Now the queue is just growing.  Nothing is going anywhere, though the log shows it trying.  I don't get that at all...

it didn't like the "f" so I ran "ps -ewl


bash-2.05b# ps -ewl
  UID   PID  PPID CPU PRI NI   VSZ   RSS WCHAN   STAT TT       TIME COMMAND
    0 31097 14405   0  10 20   840   764 wait   I     p0    0:00.04 TERM=xterm SHELL=/usr/local/bin/bash SSH_CLIENT=10.0.0.20 2339
    0 25381 31097   0   2 20   164   436 kqread I+    p0    0:00.43 SHELL=/usr/local/bin/bash TERM=xterm SSH_CLIENT=10.0.0.20 2339
    0 10324 14110   0  10 20   824   752 wait   I     p1    0:00.23 TERM=xterm SHELL=/usr/local/bin/bash SSH_CLIENT=10.0.0.20 2378
    0 25404 10324   0  28 20   340   204 -      R+    p1    0:00.00 SHELL=/usr/local/bin/bash TERM=xterm SSH_CLIENT=10.0.0.20 2378
    0 18642     1  11  18 20   416   312 pause  I     C0-   0:00.01 PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/ PWD=/ /bin/sh /comman
    0 30884 18642   0  10 20    76   400 nanosl I     C0-   0:00.18 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 12861 18642   5  -6 20    84   328 piperd I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0  3097 30884   0   2 20    64   392 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0  2681 30884   0   2 20    80   396 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 13701 30884   0   2 20    48   396 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 14657 30884   0   2 20    96   392 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 14323 30884   0   2 20    48   392 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0  9627 30884   0   2 20    76   392 poll   I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 20364 14323   0   2 20   120   424 netcon I     C0-   0:00.64 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 27926 13701  18  18 20   408   308 pause  I     C0-   0:00.01 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bi
    0 15821  1917   0   2 20    68   400 select I     C0-   0:00.37 PATH=/var/qmail/bin:/command:/usr/local/bin:/usr/local/sbin:/bi
    0  7344     1   6   3 20    96   476 ttyin  Is+   C0    0:00.01 /usr/libexec/getty Pc ttyC0
    0 26578     1   6   3 20    64   476 ttyin  Is+   C1    0:00.01 /usr/libexec/getty Pc ttyC1
    0  1673     1   6   3 20    84   480 ttyin  Is+   C2    0:00.01 /usr/libexec/getty Pc ttyC2
    0 20222     1   6   3 20    84   476 ttyin  Is+   C3    0:00.01 /usr/libexec/getty Pc ttyC3
    0 32074     1   6   3 20   108   472 ttyin  Is+   C5    0:00.01 /usr/libexec/getty Pc ttyC5
bash-2.05b#

 

by: fkoyerPosted on 2009-09-04 at 19:54:07ID: 25264791

It would help if you could post the exact NDR message that you are getting back. Also make sure your mail server is not an open relay by going to http://www.checkor.com/ and putting in your mail server address. If any tests show an error, you might have spammers using your mail server to send out mail. Are you running any other services on this server, such as any websites? It's possible for hackers to inject mail into your queue using poorly written scripts on your server.

 

by: shauncroucherPosted on 2009-09-05 at 04:30:37ID: 25265818

This sounds to me like you are not doing recipient validation. A Spammer will send an email to your server to an alias it knows to NOT EXIST. It will use a faked 'Sender' address and this is the intended recipient. Your server will send an NDR to the faked 'Sender' saying you do not have a user by that name.

The clues here are NDR's to unknown recipients and the From is blank <>. Typical of NDR SPAM.

I don't know about qmail but this will start you off: http://www.lifewithqmail.org/lwq.html#smtp-reject

Shaun

 

by: ScottmanohPosted on 2009-09-06 at 12:59:40ID: 25271263

The server is not an open relay.  The messages are about buying watches and enlarging body parts...

I'll check the recipient validation info.  Thanks.

 

by: ScottmanohPosted on 2009-09-10 at 12:15:23ID: 25303304

Thanks for the contributing comments.

I discovered that although we get all incoming mail via a 3rd party spam filter server, we were accepting messages from anyone on the internet.  I edited tcp.smtp in the /home/vpop/etc dir to disallow any connections not from our service provider.

Mail was still not going out, but the logs were MUCH easier to read now.  They recorded DNS errors, so I looked a little deeper and found the DNS this machine was looking at was not ours, but somewhere else on the Internet, and has apparently been taken offline.  I changed it to look to our internal DNS server and all is well.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...