Question

Qmail-pop3d failing to authenticate

Asked by: j4jones

Hi

   I have been running qmail for several years. Recently, I had to bring up a hot backup server after a mail server crashed. The admin I put on this did NOT do a full job of installing qmail and I have had nothing but headaches re-tracing her steps. Anyway, I have the basic install of qmail up and running (it is sending and receiving emails). The trouble comes in with Qmail-pop3d. It is failing to authenticate from remote connections using user accounts and passwords I KNOW exist. Any help or suggestions would be appreciated.

Thanks
JJ

Here is a local test of qmail-popup....
 
# ./qmail-popup /bin/checkpassword id
+OK <7154.1243953583@/bin/checkpassword>
user ********
+OK 
pass ************
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@?????? bin]# 
 
Here is the contents of /var/qmail/supervise/qmil-pop3d/run file
#!/bin/sh
exec /usr/local/bin/softlimit -m 5000000 /usr/local/bin/tcpserver -v -R -H -l 0 0 110 /var/qmail/bin/qmail-popup ??????.?????.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 2>&1 
 
Ownership of /bin/checkpassword
 
-rwx------   1 root root  14496 May  3 18:15 checkpassword
 
Contents of /var/log/qmail/pop3d/current
 
@400000004a23d0aa36065c44 tcpserver: status: 0/40
@400000004a23d0c82b4dda84 tcpserver: status: 1/40
@400000004a23d0c82b4f9bbc tcpserver: pid 2204 from 24.229.11.254
@400000004a23d0c82b4fca9c tcpserver: ok 2204 0:64.34.95.49:110 :24.229.11.254::39066
@400000004a23d0d5148b162c tcpserver: end 2204 status 256
@400000004a23d0d5148b1a14 tcpserver: status: 0/40
@400000004a23d66c21ad50a4 tcpserver: status: 1/40
@400000004a23d66c21af63e4 tcpserver: pid 2312 from 24.229.11.254
@400000004a23d66c21af9a94 tcpserver: ok 2312 0:64.34.95.49:110 :24.229.11.254::44751
@400000004a23d67809e9123c tcpserver: end 2312 status 256
@400000004a23d67809e91a0c tcpserver: status: 0/40
@400000004a244a6f3781f40c tcpserver: status: 1/40
@400000004a244a6f3783e424 tcpserver: pid 4287 from 24.229.11.254
@400000004a244a6f37841304 tcpserver: ok 4287 0:64.34.95.49:110 :24.229.11.254::43634
@400000004a244a700b545654 tcpserver: end 4287 status 256
@400000004a244a700b545a3c tcpserver: status: 0/40
@400000004a25223e0cb60164 tcpserver: status: 1/40
@400000004a25223e0cb7ed94 tcpserver: pid 6773 from 24.229.11.254
@400000004a25223e0cb8205c tcpserver: ok 6773 0:64.34.95.49:110 :24.229.11.254::44882
@400000004a25224f2b1fd544 tcpserver: end 6773 status 256
@400000004a25224f2b1fdd14 tcpserver: status: 0/40
@400000004a25225408aa681c tcpserver: status: 1/40
@400000004a25225408ac2954 tcpserver: pid 6782 from 24.229.11.254
@400000004a25225408ac5834 tcpserver: ok 6782 0:64.34.95.49:110 :24.229.11.254::46376
@400000004a25226c11abdf54 tcpserver: end 6782 status 256
@400000004a25226c11abe724 tcpserver: status: 0/40

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:

Select allOpen in new window

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-06-02 at 10:07:58ID24457347
Tags

Qmail POP3D Checkpassword Authentication failure

Topics

Qmail Email Server

,

Linux Administration

Participating Experts
1
Points
125
Comments
5

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. Qmail Problem
    Hi, First Time i am using Qmail in my oranisation. i am using Qmail as inmailing server. it was working fine few days back but now it's not accepting any mails.. when i tested locally by sending a mail to local user on the server it's giving the following error message.. ...
  2. Authenticating to allow relay SMTP for qmail
    I've recently installed qmail and courier-imap . I've found that with the installation I have, the only way to control relaying is allowing rcpt to addresses and allowing IP addresses. This won't quite be sufficient. I want to allow authentication like I used to do with Se...
  3. qmail not running on port 25
    I installed qmail and it seems to be running, but nothing is listening on port 25. When I do "netstat -lntp", it doesn't show anything on port 25. Here's the results of telnet and ps: $ telnet localhost 25 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: ...
  4. qmail users
    I setup qmail on a fedora server. I’m pretty sure qmail is up and ready to receive emails, because when I run qmailctl stat I get the following /service/qmail-send: up (pid 2085) 338534 seconds /service/qmail-send/log: up (pid 2086) 338534 seconds /service/qmail-sm...
  5. DomainKeys with Qmail 1.03
    My mail program, Qmail, was patched to support DomainKeys (http://www.qmail.org/qmail-1.03-dk-0.54.patch) and there's a tutorial I found detailing how to patch the program (http://jeremy.kister.net/howto/dk.html). The tutorial says, skip if you have an existing/compatible qma...

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: it4sohoPosted on 2009-06-03 at 07:50:27ID: 24537187

Your issue appears to be a common one when people install QMail "from scratch" -- the permissions are off.

But I don't think it is the checkpassword program that is what is wrong... when /bin/checkpassword is SUCCESSFUL, it is supposed to run /var/qmail/bin/qmail-pop3d AS THE QUTHENTICATED USER

My guess is that the permissions on qmail-pop3d are not set properly.... the MOST COMMON error I've seen is a lack of EXECUTE permission for either the qmail-pop3d folder or a parent, although it is also not uncommon to find qmail-pop3d/run also not having execute permissions allowed.

Remember though, these programs are run with the userid of the user being authenticated -- so there needs to be execute permissions (on folders and the run script) for ALL.

I hope this helps!

Dan
IT4SOHO

 

by: j4jonesPosted on 2009-06-03 at 17:43:20ID: 24542707

Hi Dan

  Sorry, That wasn't it either. I checked all permissions on all references to qmail-pop3d and nada. All were good. Still getting the same error.

Thanks
JJ

 

by: it4sohoPosted on 2009-06-05 at 09:28:36ID: 24557967

Hmmm.... you're going to have to do some investigation then... have you looked at the log files for the pop3 daemon?

Anyway, to help you dig through this, let's look at the processing path...

The REAL process that listens on port 110 (for POP access) is tcpserver (part of the ucspi package).
tcpserver gets its "instructions" for what to do upon a request at port 110 from the file:
  /var/qmail/supervise/qmail-pop3d/run
(In reality, this file actually RAN the tcpserver daemon, configuring it to listen on port 110, and describing what to do when something connects there).

In your case, you have the following options defined:
 -v (verbose output for logging)
 -R (do NOT attempt to get remote host IP information)
 -H (do NOT do a reverse DNS name lookup on the remote host)
 -l  0 (do NOT lookup yourself in DNS -- use this name (0) instead)
hostname 0
port 110
program to run = /var/qmail/bin/qmail-popup ??????.?????.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir

So... I think it's safe to assume that tcpserver is working properly, or else you would be getting a server error other than "login failed"...

So next, we should look at qmail-popup: This program reads a POP3 username & password from STDIN (which was connected to the network port by tcpserver). The options are an FQDN (which means it should be more than JUST the domain name -- eg: mail.mydomain.com instead of just mydomain.com), and another sub-program. In your case, the subprogram is "/bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir"

So far, everything has been run as root -- so you shouldn't have any permissions errors yet...

checkpassword reads the username and password as provided by qmail-popup (surprisingly, from FD3 -- which contains the username0password0timestamp. If they are OK, the program supplied is run. If not, the program exits.

In so far as you already suspect the checkpassword program is failing, look here for a full description of how the program works:
  http://cr.yp.to/checkpwd/interface.html

It is important to note that checkpassword is used on systems where mail accounts are unix accounts! And if you're checking user passwords with Samba or something else, you may well have a problem.

You can also run into problems with PAM and checkpassword... but that's another "ball of wax"

Assuming checkpassword is successful, you'll finally run /var/qmail/bin/qmail-pop3d Maildir

For pure testing purposes, you may want to change the qmail-pop3d entry to something that writes an entry into a log file -- that way you can see if checkpassword is working (running the program), or if the called program (qmail-pop3d) is the culprit...

That's about all I have time to write just now... let me know the results of the testing I suggested above...

Dan
IT4SOHO

 

by: it4sohoPosted on 2009-06-22 at 07:16:39ID: 24682690

It has been more than 2-weeks since this question received any activity... is the problem solved? If so, please close the question & award points (if deserved).

Thanks,

Dan
IT4SOHO

 

by: j4jonesPosted on 2011-01-19 at 07:27:01ID: 34639348

I figured it out on my own.

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...