Hi,
The subject says it all.
For two days i've been trying to get IMAP and IMAPS working and nothing.
I'm running CentOS 4.4 with qmail-ldap
I just can't login in dovecot.
Following my signature is some info.
You can find my dovecot.conf at http://www.gamito.org/dovecot.conf
I'm about to give up :(
Any help would be appreciated.
Warm Regards, Mário Gamito
[root@mail login]# telnet mail.sincity.lan 143 Trying 192.168.5.129... Connected to mail.sincity.lan (192.168.5.129). Escape character is '^]'.
- OK Dovecot ready. O LOGIN gamito@mail.sincity.lan 143 O NO Temporary authentication failure. O LOGOUT
- BYE Logging out O OK Logout completed. Connection closed by foreign host.
[root@mail login]# tail /var/log/dovecot/dovecot.log dovecot: Feb 17 00:01:02 Info: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.5.129 rip=192.168.5.129 resp=<hidden> dovecot: Feb 17 00:01:02 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Executed: /usr/local/bin/auth_imap /usr/local/libexec/dovecot/checkpassword-reply dovecot: Feb 17 00:01:02 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Received no input dovecot: Feb 17 00:01:02 Error: auth(default): checkpassword: Child 31122 died with signal 11 dovecot: Feb 17 00:01:04 Info: auth(default): client out: FAIL 1 user=gamito@mail.sincity.lan temp dovecot: Feb 17 00:01:10 Info: imap-login: Aborted login: user=<gamito@mail.sincity.lan>, method=PLAIN, rip=192.168.5.129, lip=192.168.5.129, secured
On Sat 17 Feb 2007 at 12:44AM, M?rio Gamito wrote:
/usr/local/bin/auth_imap /usr/local/libexec/dovecot/checkpassword-reply dovecot: Feb 17 00:01:02 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Received no input dovecot: Feb 17 00:01:02 Error: auth(default): checkpassword: Child 31122 died with signal 11
Looks like you have a crash. See the signal 11? That is
SIGSEGV 11 /* segmentation violation */
So... look for the core file, and post a stack trace of it.
-dp
-- Daniel Price - Solaris Kernel Engineering - dp@eng.sun.com - blogs.sun.com/dp
Hi,
Looks like you have a crash. See the signal 11? That is
SIGSEGV 11 /* segmentation violation */
Hereis the result of $ strace /usr/local/sbin/dovecot &
Warm Regards, Mário Gamito [root@mail dovecot-1.0.rc22]# strace /usr/local/sbin/dovecot & [1] 22381 [root@mail dovecot-1.0.rc22]# execve("/usr/local/sbin/dovecot", ["/usr/local/sbin/dovecot"], [/* 23 vars */]) = 0 uname({sys="Linux", node="mail.sincity.lan", ...}) = 0 brk(0) = 0x92b1000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=68770, ...}) = 0 old_mmap(NULL, 68770, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f05000 close(3) = 0 open("/lib/tls/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\216"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1525004, ...}) = 0 old_mmap(0x604000, 1223900, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x604000 old_mmap(0x729000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124000) = 0x729000 old_mmap(0x72d000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x72d000 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f04000 mprotect(0x729000, 8192, PROT_READ) = 0 mprotect(0x5fb000, 4096, PROT_READ) = 0 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f04aa0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 munmap(0xb7f05000, 68770) = 0 time(NULL) = 1171672393 brk(0) = 0x92b1000 brk(0x92da000) = 0x92da000 uname({sys="Linux", node="mail.sincity.lan", ...}) = 0 getpid() = 22383 geteuid32() = 0 open("/usr/local/etc/dovecot.conf", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=41343, ...}) = 0 pread64(3, "## Dovecot configuration file\n\n#"..., 2048, 0) = 2048 pread64(3, "lose (although that could also b"..., 2006, 2048) = 2006 pread64(3, "tirely.\n#ssl_parameters_regenera"..., 2044, 4054) = 2044 pread64(3, "d per each login process. This s"..., 2010, 6098) = 2010 pread64(3, "mespace settings, you can do it "..., 2044, 8108) = 2044 pread64(3, "names with eg. /path/\n# or ~user"..., 1993, 10152) = 1993 pread64(3, "daemons or other system users.\n#"..., 2006, 12145) = 2006 pread64(3, "ents work in different ways, so "..., 2028, 14151) = 2028 pread64(3, "y entries which are directories."..., 2001, 16179) = 2001 pread64(3, "hen mbox changes unexpectedly we"..., 2045, 18180) = 2045 pread64(3, "sr/libexec/dovecot/rawlog /usr/l"..., 2022, 20225) = 2022 pread64(3, "breaks by adding the line if\n #"..., 1998, 22247) = 1998 pread64(3, "u\n # tpop3d : %Mf"..., 2017, 24245) = 2017 pread64(3, "ing mails.\n #sendmail_path = /u"..., 2022, 26262) = 2022 pread64(3, "sername formatting before it\'s l"..., 2045, 28284) = 2045 pread64(3, "d nothing more).\n # You can hav"..., 1989, 30329) = 1989 pread64(3, "It isn\'t enabled by default\n "..., 2002, 32318) = 2002 pread64(3, "p://wiki.dovecot.org/AuthDatabas"..., 2041, 34320) = 2041 pread64(3, "ttp://wiki.dovecot.org/UserDatab"..., 2043, 36361) = 2043 pread64(3, "# use connect sockets. They assu"..., 2048, 38404) = 2048 pread64(3, "message would make user go over "..., 2016, 40452) = 891 pread64(3, "", 1125, 41343) = 0 close(3) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(3) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(3) = 0 open("/etc/nsswitch.conf", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1623, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f15000 read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1623 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f15000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=68770, ...}) = 0 old_mmap(NULL, 68770, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f05000 close(3) = 0 open("/lib/libnss_files.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\33\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=47468, ...}) = 0 old_mmap(NULL, 41608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xc57000 old_mmap(0xc60000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xc60000 close(3) = 0 mprotect(0xc60000, 4096, PROT_READ) = 0 munmap(0xb7f05000, 68770) = 0 open("/etc/passwd", O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=2090, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f15000 read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2090 close(3) = 0 munmap(0xb7f15000, 4096) = 0 access("/usr/local/libexec/dovecot/imap", X_OK) = 0 access("/var/log/dovecot/dovecot.log", W_OK) = 0 access("/usr/local/libexec/dovecot/imap-login", X_OK) = 0 mkdir("/var/run/dovecot/", 0777) = -1 EEXIST (File exists) stat64("/var/run/dovecot/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/var/run/dovecot/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 4 entries */, 4096) = 112 getdents64(3, /* 0 entries */, 4096) = 0 close(3) = 0 mkdir("/usr/local/var/lib/dovecot", 0750) = -1 EEXIST (File exists) lstat64("/var/run/dovecot/login", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 open("/var/run/dovecot/login", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 close(3) = 0 lstat64("/var/run/dovecot/login", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 open("/var/run/dovecot/login", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 3 entries */, 4096) = 88 lstat64("/var/run/dovecot/login/ssl-parameters.dat", {st_mode=S_IFREG|0644, st_size=230, ...}) = 0 getdents64(3, /* 0 entries */, 4096) = 0 close(3) = 0 open("/etc/passwd", O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=2090, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f15000 read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2090 close(3) = 0 munmap(0xb7f15000, 4096) = 0 access("/usr/local/libexec/dovecot/dovecot-auth", X_OK) = 0 open("/dev/null", O_RDONLY|O_LARGEFILE) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 dup(3) = 4 fcntl64(4, F_GETFD) = 0 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 bind(5, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.5.129")}, 16) = 0 getsockname(5, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.5.129")}, [16]) = 0 listen(5, 8) = 0 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 fcntl64(5, F_GETFD) = 0 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0 dup2(4, 0) = 0 dup2(4, 1) = 1 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f04ae8) = 22384 exit_group(0) = ? Process 22383 detached
On Sat 17 Feb 2007 at 12:52AM, M?rio Gamito wrote:
Hi,
Looks like you have a crash. See the signal 11? That is
SIGSEGV 11 /* segmentation violation */
Hereis the result of $ strace /usr/local/sbin/dovecot &
You need to find the core file, and then use gdb or some other tool to backtrace it.
At the end of this, you can see that the master dovecot forks (the call to clone) and the problem is happening in a subprocess.
-dp
-- Daniel Price - Solaris Kernel Engineering - dp@eng.sun.com - blogs.sun.com/dp
Hi,
You need to find the core file, and then use gdb or some other tool to backtrace it.
At the end of this, you can see that the master dovecot forks (the call to clone) and the problem is happening in a subprocess. Sorry for my ignorance, but how do i do that ?
Thanks in advance.
Warm Regards, Mário Gamito
On 17.2.2007, at 2.44, Mário Gamito wrote:
dovecot: Feb 17 00:01:02 Info: auth(default): checkpassword (gamito@mail.sincity.lan,192.168.5.129): Executed: /usr/local/bin/ auth_imap /usr/local/libexec/dovecot/checkpassword-reply dovecot: Feb 17 00:01:02 Info: auth(default): checkpassword (gamito@mail.sincity.lan,192.168.5.129): Received no input dovecot: Feb 17 00:01:02 Error: auth(default): checkpassword: Child
31122 died with signal 11
I replied to your other mail about this. You'll probably want to wait
for 1.0.rc23, or try this night's nightly snapshot (http://
dovecot.org/nightly/dovecot-20070217.tar.gz), which should arrive in
about 1,5 hours. It'll fix that crash, and hopefully makes the
authentication work then.
Hi,
I replied to your other mail about this. You'll probably want to wait for 1.0.rc23, or try this night's nightly snapshot (http://dovecot.org/nightly/dovecot-20070217.tar.gz), which should arrive in about 1,5 hours. It'll fix that crash, and hopefully makes the authentication work then. Yes, it seems there is no crash, but i still can't authenticate:
"[root@mail dovecot-1.0.rc22]# tail -f /var/log/dovecot/dovecot.log dovecot: Feb 17 10:27:21 Info: Dovecot v1.0.rc22 starting up dovecot: Feb 17 10:27:42 Info: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.5.129 rip=192.168.5.129 resp=<hidden> dovecot: Feb 17 10:27:42 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Executed: /usr/local/bin/auth_imap /usr/local/libexec/dovecot/checkpassword-reply dovecot: Feb 17 10:27:42 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Received input: userdb_uid=0 userdb_gid=0 dovecot: Feb 17 10:27:43 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Received no input dovecot: Feb 17 10:27:43 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): exit_status=0 dovecot: Feb 17 10:27:43 Error: auth(default): file auth-request.c: line 880 (auth_request_set_field): assertion failed: (*name != '\0') dovecot: Feb 17 10:27:43 Error: auth(default): Raw backtrace: dovecot-auth [0x806078d] -> dovecot-auth [0x806030f] -> dovecot-auth(auth_request_set_field+0x488) [0x80535fc] -> dovecot-auth(auth_request_set_fields+0x3c) [0x80536e0] -> dovecot-auth [0x805b0b3] -> dovecot-auth [0x805b216] -> dovecot-auth [0x8063af5] -> dovecot-auth(io_loop_handler_run+0x131) [0x80638b1] -> dovecot-auth(io_loop_run+0x21) [0x8062e49] -> dovecot-auth(main+0x403) [0x8056ac7] -> /lib/tls/libc.so.6(__libc_start_main+0xd3) [0x618de3] -> dovecot-auth [0x804f6a9] dovecot: Feb 17 10:27:43 Error: child 20889 (auth) killed with signal 6 dovecot: Feb 17 10:27:47 Info: imap-login: Aborted login: method=PLAIN, rip=192.168.5.129, lip=192.168.5.129, secured"
Any help would be appreciated.
My dovecot.conf: http://www.gamito.org/dovecot.conf
Warm Regards, Mário Gamito
On Sat, 2007-02-17 at 10:34 +0000, Mário Gamito wrote:
checkpassword(gamito@mail.sincity.lan,192.168.5.129): Executed: /usr/local/bin/auth_imap /usr/local/libexec/dovecot/checkpassword-reply dovecot: Feb 17 10:27:42 Info: auth(default): checkpassword(gamito@mail.sincity.lan,192.168.5.129): Received input: userdb_uid=0 userdb_gid=0
So auth_imap really doesn't do anything else than authenticate the user. Or does it do even that correctly?
checkpassword scripts are supposed to change the process's UID and GID, but as you see above the auth_imap keeps the process as root. You could kludge around this by creating a few extra scripts that do "su mailuser" or something and only after then execute checkpassword-reply. Otherwise Dovecot thinks you want to run the imap/pop3 processes as root, and it prevents that.
dovecot: Feb 17 10:27:43 Error: auth(default): file auth-request.c: line 880 (auth_request_set_field): assertion failed: (*name != '\0')
Whops, yea, still a bit broken. This patch will fix it: http://dovecot.org/list/dovecot-cvs/2007-February/007744.html
I also built a new nightly snapshot with the fix in it.
On Sat, 2007-02-17 at 13:31 +0200, Timo Sirainen wrote:
checkpassword scripts are supposed to change the process's UID and GID, but as you see above the auth_imap keeps the process as root. You could kludge around this by creating a few extra scripts that do "su mailuser" or something and only after then execute checkpassword-reply. Otherwise Dovecot thinks you want to run the imap/pop3 processes as root, and it prevents that.
Actually maybe there's an alternative easier way to do this. Set the user in dovecot.conf:
auth default { .. user = your-mail-user .. }
Hi,
Timo Sirainen wrote:
On Sat, 2007-02-17 at 13:31 +0200, Timo Sirainen wrote:
checkpassword scripts are supposed to change the process's UID and GID, but as you see above the auth_imap keeps the process as root. You could kludge around this by creating a few extra scripts that do "su mailuser" or something and only after then execute checkpassword-reply. Otherwise Dovecot thinks you want to run the imap/pop3 processes as root, and it prevents that. Don't know how to do that :(
Actually maybe there's an alternative easier way to do this. Set the user in dovecot.conf:
auth default { .. user = your-mail-user .. } [root@mail dovecot-1.0.rc22]# /usr/local/sbin/dovecot & [1] 21710 [root@mail dovecot-1.0.rc22]# Error: Auth user doesn't exist: gamito@mail.sincity.lan
Warm Regards, Mário Gamito
participants (3)
-
Dan Price
-
Mário Gamito
-
Timo Sirainen