Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-30 Thread Gor ony
OK, now I'm quite confused. [pclark@c3po x86_64]$ rpm -q --showrc 
courier-imap-4.12.0-1.18.x86_64.rpm | grep umask
  umask 022
[pclark@c3po x86_64]$
[pclark@c3po downloads.courier]$ rpmbuild -ta courier-imap-4.12.0.tar.bz2
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.0tOD6K
+ umask 022
+ cd /home/pclark/rpm/BUILD
+ cd /home/pclark/rpm/BUILD
+ rm -rf courier-imap-4.12.0
+ /usr/bin/bzip2 -dc /home/pclark/downloads.courier/courier-imap-4.12.0.tar.bz2
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd courier-imap-4.12.0
(rest of build).
 But it's still drwxr-x--- bin:bin for the output rpm. What else would set it 
that way? From: mr...@courier-mta.com
To: courier-users@lists.sourceforge.net
Date: Wed, 27 Mar 2013 20:10:24 -0400
Subject: Re: [courier-users] Strange issue with authentication/mail pickup

Gor ony writes:
 
 [root@c3po x86_64]# rpm -qlv courier-imap | grep dr
 drwxr-x--- 
 2 bin bin 0 Mar 25 19:30 /usr/lib/courier- 
 imap
 drwxr-x---
 
Well, something is messing up your build's umask.
 
rpm -q --showrc should show umask 022 in the ___build_pre macro; but looks  
like you're building with a umask of 027.
 
You'll need to track this down, because you might have other, less obvious,  
issues crop up eventually, if the permissions are wrong.
 

--
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users 
  --
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-30 Thread Sam Varshavchik

Gor ony writes:


« HTML content follows »

OK, now I'm quite confused.
 
[pclark@c3po x86_64]$ rpm -q --showrc courier-imap-4.12.0-1.18.x86_64.rpm |  
grep umask

  umask 022
[pclark@c3po x86_64]$

[pclark@c3po downloads.courier]$ rpmbuild -ta courier-imap-4.12.0.tar.bz2
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.0tOD6K
+ umask 022
+ cd /home/pclark/rpm/BUILD
+ cd /home/pclark/rpm/BUILD
+ rm -rf courier-imap-4.12.0
+ /usr/bin/bzip2 -dc /home/pclark/downloads.courier/courier- 
imap-4.12.0.tar.bz2

+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd courier-imap-4.12.0
(rest of build).
 


But it's still drwxr-x--- bin:bin for the output rpm. What else would set it  
that way?


The explicit command that creates the installation directory. umask is just  
the default umask, and you've verified that the default umask is set  
correctly.


It's later down the road when the installation image for the package gets  
prepared, as everything that goes into a package gets installed into a  
temporary directory. Something like this:


make  install-exec-am install-data-am
make[2]: Entering directory `/home/mrsam/src/courier-imap'
:
list='imapd pop3d maildirmake maildiracl deliverquota maildirkw'; test -n  
/usr/lib/courier-imap/bin || list=; \

if test -n $list; then \
 echo  /usr/bin/mkdir -p '/tmp/inst-root/usr/lib/courier-imap/bin'; \
 /usr/bin/mkdir -p /tmp/inst-root/usr/lib/courier-imap/bin || exit 1; \
fi; \


With the default umask, and mkdir -p, this should set the permissions  
correctly. But the actual command that gets executed, to create the bin  
directory, might be something else, it's set up by the configure script.  
Perhaps, in your case, it's using install-sh, or something else.


In any case, this is not some unknown, deep mystery. File permissions don't  
just get set up randomly, on a whim. There must be a reason for that, and  
it's just that matter of tracking it down.




pgpg_05jUWB4z.pgp
Description: PGP signature
--
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-27 Thread Gor ony



From: mr...@courier-mta.com
To: courier-users@lists.sourceforge.net
Date: Tue, 26 Mar 2013 20:19:43 -0400
Subject: Re: [courier-users] Strange issue with authentication/mail pickup
 
Just checked, and the RPMs that I build myself will install /usr/lib/courier- 
imap with permissions rwxr-xr-x
 
Sounds like a problem with the RPM build environment. 

Interesting, I'm using a default FC18 setup with normal umasks and no 
modifications to rpmbuild that I'm aware of but it's
definitely not doing that for me:

[root@c3po x86_64]# rpm -qlv courier-imap | grep dr
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/bin
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/etc
drwxr-xr-x2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/etc/shared
drwxr-xr-x2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/etc/shared.tmp
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/libexec
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/man
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/man/man1
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/man/man8
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/sbin
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/share
drwxr-x---2 bin bin 0 Mar 25 19:30 
/usr/lib/courier-imap/share/doc/courier-imap-4.12.0


  --
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-26 Thread Gor ony

Hi!

Thanks for the process, tucked that back in the troubleshooting book.

It would appear that since the RPM installed itself as owner bin.bin with 
rwxrwx--- as permissions for /usr/lib/courier-imap and 
/usr/lib/courier-imap/bin the user postfix was calling with (vmail) wasn't able 
to fork the next process out. Adding world read/execute on the directories and 
the executables in bin fixed it.


From: mr...@courier-mta.com
To: courier-users@lists.sourceforge.net
Date: Mon, 25 Mar 2013 23:59:03 -0400
Subject: Re: [courier-users] Strange issue with authentication/mail pickup

Gor ony writes:
 
 What I can't piece together is how to debug the break between authlib saying  
 Valid user and exec(imap/pop3) Failed.
 Thanks,
 
Find the pid of the couriertcpd pid that's listening on the imap port, you  
seem to be trying imap-ssl, so that will be port 993:
 
# /sbin/fuser -n tcp 993
993/tcp:   803
 
So that's PID 803, in my case. Attach strace to that process:
 
# strace -f -o /tmp/strace.log -s 256 -p 803
Process 803 attached
 
The attempt to make a connection. After it fails, you can kill strace with  
CTRL-C.
 
The log file will be a little bit large, you can grep it for clues:
 
]# fgrep execve /tmp/strace.log
336   execve(/usr/lib/courier-imap/bin/couriertls, [/usr/lib/courier- 
imap/bin/couriertls, -server, -tcpd, /usr/lib/courier- 
imap/sbin/imaplogin, /usr/lib/courier-imap/bin/imapd, Maildir], [/* 58  
vars */]) = 0
337   execve(/usr/lib/courier-imap/sbin/imaplogin, [/usr/lib/courier- 
imap/sbin/imaplogin, /usr/lib/courier-imap/bin/imapd, Maildir], [/* 59  
vars */]) = 0
337   execve(/usr/lib/courier-imap/bin/imapd, [/usr/lib/courier- 
imap/bin/imapd, Maildir], [/* 63 vars */]) = 0
343   execve(/usr/libexec/gam_server, [/usr/libexec/gam_server], [/* 66  
vars */] unfinished …
 
This is how it would look like for a successful login.
 
Do you have SELinux turned on? If it's on, try turning it off.

--
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users 
  --
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-26 Thread Sam Varshavchik

Gor ony writes:


« HTML content follows »

Hi!

Thanks for the process, tucked that back in the troubleshooting book.

It would appear that since the RPM installed itself as owner bin.bin with  
rwxrwx--- as permissions for /usr/lib/courier-imap and /usr/lib/courier- 
imap/bin the user postfix was calling with (vmail) wasn't able to fork the  
next process out. Adding world read/execute on the directories and the  
executables in bin fixed it.


Just checked, and the RPMs that I build myself will install /usr/lib/courier- 
imap with permissions rwxr-xr-x


Sounds like a problem with the RPM build environment.



pgp_sH3ZU5WLp.pgp
Description: PGP signature
--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-25 Thread Gor ony

Evening! From: mr...@courier-mta.com
To: courier-users@lists.sourceforge.net
Date: Mon, 25 Mar 2013 23:19:03 -0400
Subject: Re: [courier-users] Strange issue with authentication/mail pickup
Gor ony writes: 
 Hi.
  
 I've installed Fedora 18 with courier-authlib-0.65 and courier-imap-4.12. 
 I'm  
 using the howtoforge setup to do virtual mailboxes with MySQL.
 
That are multiple random bits and pieces on howtoforge, about various  
aspects of setting up different software packages. I can't tell what you've  
actually read there, and how accurate it is.I used the following link for the 
procedure:http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-fedora-18-x86_64-p6
 
 Mar 25 22:49:16 c3po imapd-ssl: exec(/usr/lib/courier-imap/bin/imapd)  
 failed!! 
 I don't know why exec(any) is failing and don't really know where to further 
  
 start troubleshooting this.
 
You can start by actually looking at /usr/lib/courier-imap/bin/imapd.  
Shouldn't take too long to figure out whether it exists, or not. And if not,  
why not. And if it is, why it cannot be executed. Either because it's  
corrupted, or whether it's permissions are wrong, and, whatever the reason  
is, why it happened. And, in all cases, after figuring out what's wrong,  
it's equally to important to figure out why and how it went wrong.
 
But it's likely faster to simply build RPMS directly from source: 
rpmbuild -ta courier-authlib-version.tar.bz2
 
Shouldn't take long before you end up with RPMs that you can simply install.  
Ditto for courier-imap.
 
This setup was compiled and installed through rpmbuild. The contents of the 
courier-imap/bin folder are:[root@c3po log]# cd /usr/lib/courier-imap/bin/
[root@c3po bin]# ls -la
total 664
drwxr-x---. 2 bin bin   4096 Mar 25 19:34 .
drwxr-x---. 8 bin bin   4096 Mar 25 19:30 ..
-rwxr-xr-x. 1 bin bin  71800 Mar 25 19:30 couriertls
-rwxr-xr-x. 1 bin bin  28768 Mar 25 19:30 deliverquota
-rwxr-xr-x. 1 bin bin 401112 Mar 25 19:30 imapd
-rwxr-xr-x. 1 bin bin  28664 Mar 25 19:30 maildiracl
-rwxr-xr-x. 1 bin bin  45576 Mar 25 19:30 maildirkw
-rwxr-xr-x. 1 bin bin  33016 Mar 25 19:30 maildirmake
-rwxr-xr-x. 1 bin bin  45408 Mar 25 19:30 pop3d
[root@c3po bin]# ./imapd
chdir ./Maildir: No such file or directory
* BYE [ALERT] Fatal error: No such file or directory: No such file or directory
ERR: root: No such file or directory
[root@c3po bin]#
[root@c3po bin]#
So authlib is installed and authenticating against my MySQL database (otherwise 
it would have failed at bad pass and/or failed at 'testauth')What I can't piece 
together is how to debug the break between authlib saying Valid user and 
exec(imap/pop3) Failed.Thanks,   --
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Strange issue with authentication/mail pickup

2013-03-25 Thread Sam Varshavchik

Gor ony writes:

What I can't piece together is how to debug the break between authlib saying  
Valid user and exec(imap/pop3) Failed.

Thanks,


Find the pid of the couriertcpd pid that's listening on the imap port, you  
seem to be trying imap-ssl, so that will be port 993:


# /sbin/fuser -n tcp 993
993/tcp:   803

So that's PID 803, in my case. Attach strace to that process:

# strace -f -o /tmp/strace.log -s 256 -p 803
Process 803 attached

The attempt to make a connection. After it fails, you can kill strace with  
CTRL-C.


The log file will be a little bit large, you can grep it for clues:

]# fgrep execve /tmp/strace.log
336   execve(/usr/lib/courier-imap/bin/couriertls, [/usr/lib/courier- 
imap/bin/couriertls, -server, -tcpd, /usr/lib/courier- 
imap/sbin/imaplogin, /usr/lib/courier-imap/bin/imapd, Maildir], [/* 58  
vars */]) = 0
337   execve(/usr/lib/courier-imap/sbin/imaplogin, [/usr/lib/courier- 
imap/sbin/imaplogin, /usr/lib/courier-imap/bin/imapd, Maildir], [/* 59  
vars */]) = 0
337   execve(/usr/lib/courier-imap/bin/imapd, [/usr/lib/courier- 
imap/bin/imapd, Maildir], [/* 63 vars */]) = 0
343   execve(/usr/libexec/gam_server, [/usr/libexec/gam_server], [/* 66  
vars */] unfinished …


This is how it would look like for a successful login.

Do you have SELinux turned on? If it's on, try turning it off.


pgp8rr0mA4hW1.pgp
Description: PGP signature
--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users