Asheesh Laroia
2011-Dec-28 18:31 UTC
[Dovecot] /usr/lib/dovecot/imap ignores log settings?
Hi Dovecot peeps, I'm enjoying running /usr/lib/dovecot/imap directly as a PREAUTH IMAP pipe. I find that it outputs log messages whose severity is INFO to stdout. I'm running it as follows: /usr/lib/dovecot/imap -c /tmp/dovecot.conf and I see the following messages output to stdout: * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in as paulproteus imap(paulproteus): Info: Connection closed bytes=0/305 Naturally, the first line is great. My /tmp/dovecot.conf is: <cut here> # single-dbox mail_location = sdbox:~/Maildir/dbox log_path = syslog info_log_path = /dev/null </cut> I'm also attaching strace output, created by running this command: echo | strace /usr/lib/dovecot/imap -c /tmp/dovecot.conf > /tmp/straced 2>&1 (The point of the "echo | " is to provide a newline and then EOF to /usr/lib/dovecot/imap.) You can see in the strace output that /usr/lib/dovecot/imap outputs the "Connection closed" message to file descriptor 2. I'd like that message to actually not be printed, which is why I set log_path to syslog. -- Asheesh. -------------- next part -------------- execve("/usr/lib/dovecot/imap", ["/usr/lib/dovecot/imap", "-c", "/tmp/dovecot.conf"], [/* 31 vars */]) = 0 brk(0) = 0x1eb8000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee31000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/x86_64/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls/x86_64", 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls", 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/x86_64/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/x86_64", 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/libdovecot-storage.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\313\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=898088, ...}) = 0 mmap(NULL, 2993560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e939000 mprotect(0x7ff03ea0d000, 2093056, PROT_NONE) = 0 mmap(0x7ff03ec0c000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd3000) = 0x7ff03ec0c000 close(3) = 0 open("/usr/lib/dovecot/libdovecot.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\217\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=533816, ...}) = 0 mmap(NULL, 2639392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e6b4000 mprotect(0x7ff03e734000, 2093056, PROT_NONE) = 0 mmap(0x7ff03e933000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000) = 0x7ff03e933000 mmap(0x7ff03e936000, 9760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff03e936000 close(3) = 0 open("/usr/lib/dovecot/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=127929, ...}) = 0 mmap(NULL, 127929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff03ee11000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee10000 mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e4b0000 mprotect(0x7ff03e4b2000, 2097152, PROT_NONE) = 0 mmap(0x7ff03e6b2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff03e6b2000 close(3) = 0 open("/usr/lib/dovecot/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0 mmap(NULL, 2128856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e2a8000 mprotect(0x7ff03e2af000, 2093056, PROT_NONE) = 0 mmap(0x7ff03e4ae000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ff03e4ae000 close(3) = 0 open("/usr/lib/dovecot/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1570832, ...}) = 0 mmap(NULL, 3684440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03df24000 mprotect(0x7ff03e09e000, 2097152, PROT_NONE) = 0 mmap(0x7ff03e29e000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17a000) = 0x7ff03e29e000 mmap(0x7ff03e2a3000, 18520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff03e2a3000 close(3) = 0 open("/usr/lib/dovecot/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\\\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=131107, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee0f000 mmap(NULL, 2208672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03dd08000 mprotect(0x7ff03dd1f000, 2093056, PROT_NONE) = 0 mmap(0x7ff03df1e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7ff03df1e000 mmap(0x7ff03df20000, 13216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff03df20000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee0e000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee0d000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee0c000 arch_prctl(ARCH_SET_FS, 0x7ff03ee0d700) = 0 mprotect(0x7ff03df1e000, 4096, PROT_READ) = 0 mprotect(0x7ff03e29e000, 16384, PROT_READ) = 0 mprotect(0x7ff03e4ae000, 4096, PROT_READ) = 0 mprotect(0x7ff03e6b2000, 4096, PROT_READ) = 0 mprotect(0x7ff03ee33000, 4096, PROT_READ) = 0 munmap(0x7ff03ee11000, 127929) = 0 set_tid_address(0x7ff03ee0d9d0) = 24515 set_robust_list(0x7ff03ee0d9e0, 0x18) = 0 futex(0x7fff1a7c2ddc, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7ff03ee0d700) = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x7ff03dd0dad0, [], SA_RESTORER|SA_SIGINFO, 0x7ff03dd17030}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7ff03dd0db60, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ff03dd17030}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 getuid() = 1000 brk(0) = 0x1eb8000 brk(0x1ee1000) = 0x1ee1000 uname({sys="Linux", node="pathi", ...}) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7ff03df56480}, NULL, 8) = 0 rt_sigaction(SIGALRM, {0x7ff03e7000d0, [], SA_RESTORER|SA_SIGINFO, 0x7ff03df56480}, NULL, 8) = 0 rt_sigaction(SIGINT, {0x7ff03e700160, [], SA_RESTORER|SA_SIGINFO, 0x7ff03df56480}, NULL, 8) = 0 pipe([3, 4]) = 0 fcntl(3, F_GETFL) = 0 (flags O_RDONLY) fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 fcntl(4, F_GETFL) = 0x1 (flags O_WRONLY) fcntl(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 epoll_create(128) = 5 fcntl(5, F_GETFD) = 0 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 epoll_ctl(5, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=32249584, u64=32249584}}) = 0 rt_sigaction(SIGTERM, {0x7ff03e700160, [], SA_RESTORER|SA_SIGINFO, 0x7ff03df56480}, NULL, 8) = 0 umask(077) = 022 stat("/tmp/dovecot.conf", {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 stat("/tmp/dovecot.conf", {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 execve("/usr/bin/doveconf", ["/usr/bin/doveconf", "-f", "service=imap", "-c", "/tmp/dovecot.conf", "-m", "imap", "-e", "/usr/lib/dovecot/imap", "-c", "/tmp/dovecot.conf"], [/* 2 vars */]) = 0 brk(0) = 0xc98000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d559d8000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/x86_64/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls/x86_64", 0x7fff99f31d70) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls", 0x7fff99f31d70) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/x86_64/libdovecot.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/x86_64", 0x7fff99f31d70) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/libdovecot.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\217\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=533816, ...}) = 0 mmap(NULL, 2639392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d55536000 mprotect(0x7f1d555b6000, 2093056, PROT_NONE) = 0 mmap(0x7f1d557b5000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000) = 0x7f1d557b5000 mmap(0x7f1d557b8000, 9760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d557b8000 close(3) = 0 open("/usr/lib/dovecot/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=127929, ...}) = 0 mmap(NULL, 127929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1d559b8000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0 mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d55332000 mprotect(0x7f1d55334000, 2097152, PROT_NONE) = 0 mmap(0x7f1d55534000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f1d55534000 close(3) = 0 open("/usr/lib/dovecot/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d559b7000 mmap(NULL, 2128856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d5512a000 mprotect(0x7f1d55131000, 2093056, PROT_NONE) = 0 mmap(0x7f1d55330000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f1d55330000 close(3) = 0 open("/usr/lib/dovecot/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1570832, ...}) = 0 mmap(NULL, 3684440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d54da6000 mprotect(0x7f1d54f20000, 2097152, PROT_NONE) = 0 mmap(0x7f1d55120000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17a000) = 0x7f1d55120000 mmap(0x7f1d55125000, 18520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d55125000 close(3) = 0 open("/usr/lib/dovecot/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\\\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=131107, ...}) = 0 mmap(NULL, 2208672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1d54b8a000 mprotect(0x7f1d54ba1000, 2093056, PROT_NONE) = 0 mmap(0x7f1d54da0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f1d54da0000 mmap(0x7f1d54da2000, 13216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1d54da2000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d559b6000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d559b5000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d559b4000 arch_prctl(ARCH_SET_FS, 0x7f1d559b5700) = 0 mprotect(0x7f1d54da0000, 4096, PROT_READ) = 0 mprotect(0x7f1d55120000, 16384, PROT_READ) = 0 mprotect(0x7f1d55330000, 4096, PROT_READ) = 0 mprotect(0x7f1d55534000, 4096, PROT_READ) = 0 mprotect(0x7f1d559da000, 4096, PROT_READ) = 0 munmap(0x7f1d559b8000, 127929) = 0 set_tid_address(0x7f1d559b59d0) = 24515 set_robust_list(0x7f1d559b59e0, 0x18) = 0 futex(0x7fff99f3265c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f1d559b5700) = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x7f1d54b8fad0, [], SA_RESTORER|SA_SIGINFO, 0x7f1d54b99030}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7f1d54b8fb60, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f1d54b99030}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 brk(0) = 0xc98000 brk(0xcc1000) = 0xcc1000 uname({sys="Linux", node="pathi", ...}) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f1d54dd8480}, NULL, 8) = 0 rt_sigaction(SIGALRM, {0x7f1d555820d0, [], SA_RESTORER|SA_SIGINFO, 0x7f1d54dd8480}, NULL, 8) = 0 rt_sigaction(SIGINT, {0x7f1d55582160, [], SA_RESTORER|SA_SIGINFO, 0x7f1d54dd8480}, NULL, 8) = 0 pipe([3, 4]) = 0 fcntl(3, F_GETFL) = 0 (flags O_RDONLY) fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 fcntl(4, F_GETFL) = 0x1 (flags O_WRONLY) fcntl(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 epoll_create(128) = 5 fcntl(5, F_GETFD) = 0 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 epoll_ctl(5, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=13243088, u64=13243088}}) = 0 rt_sigaction(SIGTERM, {0x7f1d55582160, [], SA_RESTORER|SA_SIGINFO, 0x7f1d54dd8480}, NULL, 8) = 0 open("/usr/lib/dovecot/modules/settings", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6 getdents(6, /* 2 entries */, 32768) = 48 getdents(6, /* 0 entries */, 32768) = 0 close(6) = 0 open("/tmp/dovecot.conf", O_RDONLY) = 6 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1d55973000 brk(0xce3000) = 0xce3000 brk(0xd04000) = 0xd04000 fstat(6, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 pread(6, "# single-dbox\nmail_location = sd"..., 8192, 0) = 98 pread(6, "", 8094, 98) = 0 close(6) = 0 brk(0xd2d000) = 0xd2d000 brk(0xd4f000) = 0xd4f000 brk(0xd1d000) = 0xd1d000 brk(0xd3f000) = 0xd3f000 brk(0xd61000) = 0xd61000 brk(0xd30000) = 0xd30000 execve("/usr/lib/dovecot/imap", ["/usr/lib/dovecot/imap", "-c", "/tmp/dovecot.conf"], [/* 6 vars */]) = 0 brk(0) = 0x1636000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc3711a6000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/x86_64/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls/x86_64", 0x7ffff10a0850) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/tls/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/tls", 0x7ffff10a0850) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/x86_64/libdovecot-storage.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/dovecot/x86_64", 0x7ffff10a0850) = -1 ENOENT (No such file or directory) open("/usr/lib/dovecot/libdovecot-storage.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\313\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=898088, ...}) = 0 mmap(NULL, 2993560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc370cae000 mprotect(0x7fc370d82000, 2093056, PROT_NONE) = 0 mmap(0x7fc370f81000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd3000) = 0x7fc370f81000 close(3) = 0 open("/usr/lib/dovecot/libdovecot.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\217\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=533816, ...}) = 0 mmap(NULL, 2639392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc370a29000 mprotect(0x7fc370aa9000, 2093056, PROT_NONE) = 0 mmap(0x7fc370ca8000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000) = 0x7fc370ca8000 mmap(0x7fc370cab000, 9760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc370cab000 close(3) = 0 open("/usr/lib/dovecot/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=127929, ...}) = 0 mmap(NULL, 127929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc371186000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc371185000 mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc370825000 mprotect(0x7fc370827000, 2097152, PROT_NONE) = 0 mmap(0x7fc370a27000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fc370a27000 close(3) = 0 open("/usr/lib/dovecot/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0 mmap(NULL, 2128856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc37061d000 mprotect(0x7fc370624000, 2093056, PROT_NONE) = 0 mmap(0x7fc370823000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fc370823000 close(3) = 0 open("/usr/lib/dovecot/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1570832, ...}) = 0 mmap(NULL, 3684440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc370299000 mprotect(0x7fc370413000, 2097152, PROT_NONE) = 0 mmap(0x7fc370613000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17a000) = 0x7fc370613000 mmap(0x7fc370618000, 18520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc370618000 close(3) = 0 open("/usr/lib/dovecot/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\\\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=131107, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc371184000 mmap(NULL, 2208672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc37007d000 mprotect(0x7fc370094000, 2093056, PROT_NONE) = 0 mmap(0x7fc370293000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7fc370293000 mmap(0x7fc370295000, 13216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc370295000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc371183000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc371182000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc371181000 arch_prctl(ARCH_SET_FS, 0x7fc371182700) = 0 mprotect(0x7fc370293000, 4096, PROT_READ) = 0 mprotect(0x7fc370613000, 16384, PROT_READ) = 0 mprotect(0x7fc370823000, 4096, PROT_READ) = 0 mprotect(0x7fc370a27000, 4096, PROT_READ) = 0 mprotect(0x7fc3711a8000, 4096, PROT_READ) = 0 munmap(0x7fc371186000, 127929) = 0 set_tid_address(0x7fc3711829d0) = 24515 set_robust_list(0x7fc3711829e0, 0x18) = 0 futex(0x7ffff10a113c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7fc371182700) = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x7fc370082ad0, [], SA_RESTORER|SA_SIGINFO, 0x7fc37008c030}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7fc370082b60, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fc37008c030}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 getuid() = 1000 brk(0) = 0x1636000 brk(0x165f000) = 0x165f000 uname({sys="Linux", node="pathi", ...}) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7fc3702cb480}, NULL, 8) = 0 rt_sigaction(SIGALRM, {0x7fc370a750d0, [], SA_RESTORER|SA_SIGINFO, 0x7fc3702cb480}, NULL, 8) = 0 rt_sigaction(SIGINT, {0x7fc370a75160, [], SA_RESTORER|SA_SIGINFO, 0x7fc3702cb480}, NULL, 8) = 0 pipe([3, 4]) = 0 fcntl(3, F_GETFL) = 0 (flags O_RDONLY) fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 fcntl(4, F_GETFL) = 0x1 (flags O_WRONLY) fcntl(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 epoll_create(128) = 5 fcntl(5, F_GETFD) = 0 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 epoll_ctl(5, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=23327440, u64=23327440}}) = 0 rt_sigaction(SIGTERM, {0x7fc370a75160, [], SA_RESTORER|SA_SIGINFO, 0x7fc3702cb480}, NULL, 8) = 0 umask(077) = 077 geteuid() = 1000 geteuid() = 1000 geteuid() = 1000 geteuid() = 1000 getegid() = 1000 getgid() = 1000 getegid() = 1000 setgid(0) = -1 EPERM (Operation not permitted) prctl(PR_SET_DUMPABLE, 1) = 0 geteuid() = 1000 chdir("/home/paulproteus") = 0 stat("/home/paulproteus/Maildir/dbox/mailboxes", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 prctl(PR_SET_DUMPABLE, 1) = 0 fcntl(0, F_GETFL) = 0 (flags O_RDONLY) fcntl(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 fcntl(1, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE) fcntl(1, F_SETFL, O_WRONLY|O_NONBLOCK|O_LARGEFILE) = 0 fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 lseek(1, 0, SEEK_CUR) = 25034 fstat(1, {st_mode=S_IFREG|0644, st_size=25071, ...}) = 0 epoll_ctl(5, EPOLL_CTL_ADD, 0, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=23409968, u64=23409968}}) = 0 write(1, "* PREAUTH [CAPABILITY IMAP4rev1 "..., 305* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in as paulproteus ) = 305 epoll_wait(5, {{EPOLLIN|EPOLLHUP, {u32=23409968, u64=23409968}}}, 2, 1800000) = 1 brk(0x1681000) = 0x1681000 read(0, "\n", 8192) = 1 write(1, "* BAD Error in IMAP command : Un"..., 48* BAD Error in IMAP command : Unknown command. ) = 48 epoll_wait(5, {{EPOLLHUP, {u32=23409968, u64=23409968}}}, 2, 1800000) = 1 read(0, "", 8191) = 0 write(2, "imap(paulproteus): Info: Connect"..., 57imap(paulproteus): Info: Connection closed bytes=1/25387 ) = 57 epoll_ctl(5, EPOLL_CTL_DEL, 0, {0, {u32=23409968, u64=23409968}}) = 0 brk(0x167f000) = 0x167f000 brk(0x167d000) = 0x167d000 close(0) = 0 close(1) = 0 brk(0x1678000) = 0x1678000 brk(0x1677000) = 0x1677000 brk(0x1675000) = 0x1675000 brk(0x1674000) = 0x1674000 epoll_ctl(5, EPOLL_CTL_DEL, 3, {0, {u32=23327440, u64=23327440}}) = 0 close(3) = 0 close(4) = 0 close(5) = 0 exit_group(0) = ?
On 28.12.2011, at 20.31, Asheesh Laroia wrote:> Hi Dovecot peeps, > > I'm enjoying running /usr/lib/dovecot/imap directly as a PREAUTH IMAP pipe. > > I find that it outputs log messages whose severity is INFO to stdout. I'm running it as follows: > > /usr/lib/dovecot/imap -c /tmp/dovecot.conf > > and I see the following messages output to stdout:stderr actually.> I'd like that message to actually not be printed, which is why I set log_path to syslog.Not possible currently. Either do: /usr/lib/dovecot/imap 2>> ~/imap.log Or patch the source: diff -r 056934abd2ef src/imap/main.c --- a/src/imap/main.c Wed Dec 21 14:40:29 2011 +0200 +++ b/src/imap/main.c Thu Dec 29 14:51:12 2011 +0200 @@ -320,6 +320,7 @@ if (IS_STANDALONE()) { service_flags |= MASTER_SERVICE_FLAG_STANDALONE | + MASTER_SERVICE_FLAG_DONT_LOG_TO_STDERR | MASTER_SERVICE_FLAG_STD_CLIENT; } else { service_flags |= MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN;