LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2011, 01:17 PM   #1
Joe72
LQ Newbie
 
Registered: Mar 2007
Location: Frankfurt, Germany
Distribution: Open SuSE12.2, Debian Squeeze
Posts: 11

Rep: Reputation: 5
BINC does not work anymore


Hello together,

I have a qmail server running binc imap since more than two years and had no problems. Recently after deleting thousands of mails the system became unstable (when opening Thunderbird I did see new mails which disappeared a few seconds later and reappeared some when... after a couple of minutes or hours). There where a few problems in my network which are now sorted. My main problem is now I cannot access the binc server anymore. When I run

Code:
qmail:/var# mconnect 127.0.0.1 143
* OK Welcome to Binc IMAP Copyright (C) 2002-2005 Andreas Aardal Hanssen at 2011-06-23 18:04:39 +0000
01 LOGIN user password
* BYE The server died unexpectedly. Please contact your system administrator for more information.
below is what happens when I use a wrong password:

Code:
qmail:/var# mconnect 127.0.0.1 143
* OK Welcome to Binc IMAP Copyright (C) 2002-2005 Andreas Aardal Hanssen at 2011-06-23 18:06:10 +0000
001 LOGIN user wrongpassword
001 NO LOGIN failed: Login failed. Either your user name or your password was wrong. Please try again, and if the problem persists, please contact your system administrator.
Here comes the config I use

Code:
Authentication {
        allow plain auth in non ssl = "yes",
        auth penalty = 4,
        disable starttls = "yes"
}


Log {
        type = "multilog",
        environment ip variable = "TCPREMOTEIP"
}

Security {
        jail path = "/var/qmail/bincimap",
        jail user = nobody,
        jail group = nogroup 
}
Mailbox {
        depot = "Maildir++",
        type = "Maildir",
        path = "MAIL.IMAP",
        auto create inbox = "yes",
        auto subscribe mailboxes = "Inbox",
        umask = "077"
}

Session {
        idle timeout = 1860,
        auth timeout = 60,
        transfer timeout = 1200,
        transfer buffer size = 1024
}

SSL {
       pem file = "/root/ssl_certificates.d/newreq.pem",
        cipher list = "!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP",
       verify peer = "no"
}
I ran a trace using wireshark and see each command appears twice (BINC sends two welcome messages etc) but the service is only running once.

According to the binc log the authentication for the user fails

Code:
2011-06-23 18:29:20.158340500 tcpserver: status: 1/51
2011-06-23 18:29:20.158340500 tcpserver: pid 18738 from 127.0.0.1
2011-06-23 18:29:20.158340500 tcpserver: ok 18738 0:127.0.0.1:143 :127.0.0.1::40658
2011-06-23 18:29:20.158340500 18738 0 [unknown@127.0.0.1:] connection from 127.0.0.1
2011-06-23 18:29:26.730569500 18738 1 [unknown@127.0.0.1:] <user> authentication failed: server  returned 111 (internal error)
2011-06-23 18:29:26.730569500 18738 2 [unknown@127.0.0.1:] shutting down - read:25 bytes, wrote:259 bytes.
2011-06-23 18:29:26.730569500 tcpserver: end 18738 status 0
2011-06-23 18:29:26.730569500 tcpserver: status: 0/51
The credentials are correct, I tested them with below command
Code:
printf "%s\0%s\0%s\0" user password Y123456 | /bin/checkpassword id 3<&0
I searched the net but did not find any helpful information so far and hope someone can point me to right direction :-)

UPDATE:

since the logoutput was not helpful I found what I was looking for. Below was a comment from the developer to troubleshoot another (different) issue


Quote:
Could you try an strace? Try connecting to bincimap-up's pid when you've
connected with telnet (strace -s 128 -f -p <pid>). Note the -f argument to
follow bincimapd
strace then showed the system tried to change ownership and the group and afterwards access the folder where bincimapd is located. Here is the relevant part

Code:
[pid  2167] open("/etc/passwd", O_RDONLY|0x80000) = 3
[pid  2167] fcntl64(3, F_GETFD)         = 0x1 (flags FD_CLOEXEC)
[pid  2167] _llseek(3, 0, [0], SEEK_CUR) = 0
[pid  2167] fstat64(3, {st_mode=S_IFREG|0644, st_size=1351, ...}) = 0
[pid  2167] mmap2(NULL, 1351, PROT_READ, MAP_SHARED, 3, 0) = 0xb7ee8000
[pid  2167] _llseek(3, 1351, [1351], SEEK_SET) = 0
[pid  2167] munmap(0xb7ee8000, 1351)    = 0
[pid  2167] close(3)                    = 0
[pid  2167] open("/etc/shadow", O_RDONLY|0x80000) = 3
[pid  2167] _llseek(3, 0, [0], SEEK_CUR) = 0
[pid  2167] fstat64(3, {st_mode=S_IFREG|0640, st_size=951, ...}) = 0
[pid  2167] mmap2(NULL, 951, PROT_READ, MAP_SHARED, 3, 0) = 0xb7ee8000
[pid  2167] _llseek(3, 951, [951], SEEK_SET) = 0
[pid  2167] munmap(0xb7ee8000, 951)     = 0
[pid  2167] close(3)                    = 0
[pid  2167] setgroups32(1, [100])       = 0
[pid  2167] setgid32(100)               = 0
[pid  2167] setuid32(1002)              = 0
[pid  2167] chdir("/home/oliver")       = 0
[pid  2167] execve("/var/qmail/bin/bincimapd", ["/var/qmail/bin/bincimapd"], [/* 41 vars */]) = -1 EACCES (Permission denied)
I am sure that has not changed in the last two years and have no idea why it did not work... but before raising the thread I noticed a few mails disappeared form my server and also files created did not exist after the reboot. My server is running on a vm so I guess that is not a general problem...

To make it short, the folder /var/qmail/bin/bincimapd was not accessible by the user nor the group shown in the strace above. After modifying the access rights I can see my mails again :-) The multiple login attempts also disappeared

Last edited by Joe72; 06-24-2011 at 05:37 PM.
 
Old 06-24-2011, 11:47 PM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Thank you for sharing your solution and for a very informative post. Off the Zero Reply List.

Kind regards,

Eric
 
Old 06-26-2011, 01:32 PM   #3
Joe72
LQ Newbie
 
Registered: Mar 2007
Location: Frankfurt, Germany
Distribution: Open SuSE12.2, Debian Squeeze
Posts: 11

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by EricTRA View Post
Thank you for sharing your solution and for a very informative post. Off the Zero Reply List.
you're welcome. I have learned a lot from LQ in the past and besides there was may threads with the same error message (all had a wrong config file :-( )but no general way how to troubleshoot it. Hopefully it might be some help for other members in the future
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
webilder will not work anymore ckent Linux - Software 3 10-05-2007 07:35 AM
'at' command does not work anymore gregorian Linux - Newbie 2 03-17-2007 11:05 AM
Upgrade doesn't work for me anymore royeo Linux - Newbie 0 11-24-2006 10:22 AM
Sendmail does't work anymore. lauxen Linux - Newbie 6 12-06-2005 07:50 PM
RPM command does not work anymore! davi_cabral Red Hat 3 09-20-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration