[courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Michael Carmack


I created a test user and captured the strace output from both the 
IMAP process and the mail client. Rather than send the output to the 
list (the files are a bit long), I've made them availabe at:

http://karmak.org/2002/01/courier/strace-imap.txt
http://karmak.org/2002/01/courier/strace-mutt.txt

I do not understand the meaning of everthing in the strace output, but 
there are several lines that show obvious errors. Also, the IMAP strace
has dozens of lines that look like:

rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0


Any Courier gurus recognize what's going on here?

Thanks,
m.



___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



Re: [courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Roland Schneider

--Michael Carmack wrote on 01.01.2002 16:20 +:

 
 I created a test user and captured the strace output from both the 
 IMAP process and the mail client. Rather than send the output to the 
 list (the files are a bit long), I've made them availabe at:
 
 http://karmak.org/2002/01/courier/strace-imap.txt
 http://karmak.org/2002/01/courier/strace-mutt.txt

There is no answer from authdaemond at all. Check with
authtest (somewhere in the sources) or use this script
with $prefix changed to:
/pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1
(Hope you dont have Courier in multiple directories...)


#!/usr/bin/perl

my $prefix = '/usr/lib/courier';
my $authsock = $prefix.'/var/authdaemon/socket';
(-S $authsock) or die no socket: $authsock;

my $user = $ARGV[0];
my $pass = $ARGV[1];
print # $0 $user $pass\n;

use Socket;
socket(SOCK, PF_UNIX, SOCK_STREAM, 0);
connect(SOCK, sockaddr_un($authsock)) or die $authsock: $!;

if($pass)
{ my $authstring = login\nlogin\n$user\n$pass;
  my $authlength = length($authstring);
  send SOCK, AUTH $authlength\n$authstring\n, 0 or die $authsock: $!;
}
elsif($user)
{ send SOCK, PRE . login $user\n, 0 or die $authsock: $!;
}
else
{ print Socket OK: $authsock\n;
  print Usage: $0 loginname [password]\n;
  exit(3);
}

my @data = SOCK;
close SOCK;

if ( @data =~ /FAIL/ )
{ print *** AUTH FAILED ***\n;
  exit(2);
}

print @data;

if ( !$pass )   { exit(1); }
exit(0);


___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



Re: [courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Michael Carmack

On Tue, Jan 01, 2002 at 07:44:07PM +0100, Roland Schneider wrote:
 
  
  I created a test user and captured the strace output from both the 
  IMAP process and the mail client. Rather than send the output to the 
  list (the files are a bit long), I've made them availabe at:
  
  http://karmak.org/2002/01/courier/strace-imap.txt
  http://karmak.org/2002/01/courier/strace-mutt.txt
 
 There is no answer from authdaemond at all. Check with
 authtest (somewhere in the sources) or use this script
 with $prefix changed to:
 /pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1
 (Hope you dont have Courier in multiple directories...)

My apologies: I forgot to run 'makeuserdb' after adding the 'test'
entry, so the strace output might not have shown the actual error
I've been facing with the real user accounts.

I've now uploaded new strace output files under the same URLs.

Running the script you provided gives the following:

# ./perltest [EMAIL PROTECTED] test
[EMAIL PROTECTED]
UID=10001
GID=10001
HOME=/mail/karmak.org/test
[EMAIL PROTECTED]
PASSWD=9Toor00Ea1kLk
.

Thanks,
m.


___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



[courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Sam Varshavchik

Michael Carmack writes: 

 On Tue, Jan 01, 2002 at 02:17:02PM -0500, Sam Varshavchik wrote:
 Michael Carmack writes:  
 
 
 I created a test user and captured the strace output from both the 
 IMAP process and the mail client. Rather than send the output to the 
 list (the files are a bit long), I've made them availabe at: 
 
 http://karmak.org/2002/01/courier/strace-imap.txt
 http://karmak.org/2002/01/courier/strace-mutt.txt] 
 
 23436 write(3, AUTH 32\nimap\nlogin\[EMAIL PROTECTED]..., 41) = 41  
 
 ...  
 
 23436 read(3, FAIL\n, 8191)   = 5  
 
 You supplied an incorrect login userid or password. 
 
 My mistake. I created the [EMAIL PROTECTED] entry so an actual user
 password wouldn't appear in the strace output, but forgot to run
 'makeuserdb' after doing so.

You have a serious misconfiguration there: 

23981 read(3, [EMAIL PROTECTED]\nUID=100..., 8191) = 119 

... 

23981 chdir(/mail/karmak.org/test)= 0 

That's a succesfull authentication followed by opening /mail/karmak.org/test 
as the account's home directory.  However, the next call is: 

execve(/pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd 
,  ... 

Based on the subsequent trace, this file appears not to be the imapd server 
binary, but the system startup imapd script.  So, something is seriously 
screwed up here.  Unfortunately, it is not possible to determine what that 
something is.  That's because this pathname suggests that you did not 
compile and install Courier yourself, but used a prepackaged version.  You 
should contact the package's maintainer for additional assistance.  I have 
no idea how your package was built, or what custom configuration this 
package uses.  Unless you want to tell us that you ran the configure script 
yourself (followed by make install), nobody will have any idea what your 
environment is. 

-- 
Sam 


___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



Re: [courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Michael Carmack

On Tue, Jan 01, 2002 at 05:58:09PM -0500, Sam Varshavchik wrote:
 
 23981 read(3, [EMAIL PROTECTED]\nUID=100..., 8191) = 119 
 
 ... 
 
 23981 chdir(/mail/karmak.org/test)= 0 
 
 That's a succesfull authentication followed by opening 
 /mail/karmak.org/test as the account's home directory.  However, the next 
 call is: 
 execve(/pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd 
 ,  ... 
 Based on the subsequent trace, this file appears not to be the imapd server 
 binary, but the system startup imapd script.  So, something is seriously 
 screwed up here.  Unfortunately, it is not possible to determine what that 
 something is.  That's because this pathname suggests that you did not 
 compile and install Courier yourself, but used a prepackaged version.  You 
 should contact the package's maintainer for additional assistance.  I have 
 no idea how your package was built, or what custom configuration this 
 package uses.  Unless you want to tell us that you ran the configure script 
 yourself (followed by make install), nobody will have any idea what your 
 environment is. 

You've hit it! Yes, I compiled and installed this myself, and bin/imapd 
IS a symlink to the imapd startup script. I've posted the complete build
log to:

http://karmak.org/2002/01/courier/i686-pc-linux-gnu.1.log

It's big (~1MB), but it's all there, from 'configure' to 'make install'.
Commands I've issued are prefixed with @@ to find them easily, and
the very beginning of the log shows the environment variables that are
set.

If you do a search for bin/imapd, you'll notice that during the 
installation the following two commands are run (this appears ~90% into 
the log):

rm -f /pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd
ln -s /pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/share/imapd 
/pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd

It would appear that the original bin/imapd gets deliberately removed
during 'make install', and replaced by a symlink to the imapd startup
script. 

This actually happens to _several_ of the files in the bin directory,
including the pop3 binary. I thought all those symlinks looked a little
strange, but since everything else was working fine, I assumed that, for
whatever reason, that was just the way things were done. Note that 
bin/pop3d and bin/pop3d-ssl are ALSO symlinks to startup scripts, just
like bin/imapd, but POP3 works fine. For this reason it didn't occur
to me that the installation was bad. Seriously, despite all those
crazy symlinks, the rest of Courier exhibits no end-user problems
at all.

Glad you spotted this. I'm digging into the problem right now, but I
thought I'd share the news and post the link to the log file in case 
you or someone else wanted to see it also. 

Thanks so much.

m.



___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



[courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Sam Varshavchik

Michael Carmack writes: 

 You've hit it! Yes, I compiled and installed this myself, and bin/imapd 
 IS a symlink to the imapd startup script. I've posted the complete build
 log to: 
 
 http://karmak.org/2002/01/courier/i686-pc-linux-gnu.1.log 
 
 It's big (~1MB), but it's all there, from 'configure' to 'make install'.
 Commands I've issued are prefixed with @@ to find them easily, and
 the very beginning of the log shows the environment variables that are
 set. 
 
 If you do a search for bin/imapd, you'll notice that during the 
 installation the following two commands are run (this appears ~90% into 
 the log): 
 
 rm -f /pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd
 ln -s /pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/share/imapd 
/pkg/courier/0.36.1/.i686-pc-linux-gnu/.karmak-standard.1/bin/imapd 
 
 It would appear that the original bin/imapd gets deliberately removed
 during 'make install', and replaced by a symlink to the imapd startup
 script. 

This is because your install is completely broken because you manually 
specified the same bindir and sbindir directories. 

 Glad you spotted this. I'm digging into the problem right now, but I

The problem is that you specified non-default installation directories 
without fully understanding how they work. 

-- 
Sam 


___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



Re: [courier-users] Re: IMAP (Update: strace output)

2002-01-01 Thread Michael Carmack

On Wed, Jan 02, 2002 at 12:43:59AM +, Michael Carmack wrote:
 On Tue, Jan 01, 2002 at 05:58:09PM -0500, Sam Varshavchik wrote:
  
  binary, but the system startup imapd script.  So, something is seriously 
  screwed up here.  Unfortunately, it is not possible to determine what that 
  something is.  
 
 You've hit it! Yes, I compiled and installed this myself, and bin/imapd 
 IS a symlink to the imapd startup script. I've posted the complete build
 log to:
 
 http://karmak.org/2002/01/courier/i686-pc-linux-gnu.1.log

Woo-hoo! IMAP is now working. The problem was that I don't typically use
'sbin' on my machine, instead consolidating all binaries into bin. I 
specify this at 'configure' time with --sbindir=/path/to/bin. In the case
of Courier, as you've probably guessed by this point, there is file named
'imapd' in BOTH bin and sbin: The binary in bin, and the script in sbin.
So, the installation did exactly what I told it to, first installing
the binary in 'bindir', then promptly overwriting it with the script
in 'sbindir'.

I changed the configure variable, and now things are working like a charm.
Many thanks for taking the time out to find the problem. As a token of 
thanks I'll be typing up a document describing the way I got Courier 
installed and running on my system.

Thanks again,
m.



___
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users