[Dovecot] environment variables required for startup

Marshal Newrock marshal at idealso.com
Sat Jan 27 05:02:21 UTC 2007


On Sat, 27 Jan 2007 03:24:16 +0200
Timo Sirainen <tss at iki.fi> wrote:

> > I had quota,
> > imap_quota, and trash, and tried each of these by themselves, and in
> > all cases, monit failed to start dovecot, with nothing being logged.
> > With mail_plugins commented out, monit starts dovecot.  In "protocol
> > lda", "mail_plugins = quota" with no problems.
> 
> I think "nothing being logged" is highly unlikely. See http:// 
> wiki.dovecot.org/Logging
> 
> Hmm. I think I'll have to add some --log-error command line option
> to actually log an error message so it can be easily found..

It really does log nothing.  Normal startups, or even startups with
errors in the config file (such as having the path to an sql config
file commented out) get logged.  However, I do have an strace of
dovecot being called directly (no init script, no start-stop-daemon).
The imap mail_executable was a wrapper script, but for this, I set it
back to the default /usr/libexec/dovecot/imap.  The end of the strace
is:

18945 fstat64(3, {st_mode=S_IFREG|0755, st_size=1204080, ...}) = 0
18945 mmap2(NULL, 1172860, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e95000
18945 mmap2(0xb7fad000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x117) = 0xb7fad000
18945 mmap2(0xb7fb1000, 9596, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fb1000
18945 close(3)                          = 0
18945 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e94000
18945 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e946b0,
limit:1048575 , seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0 , useable:1}) = 0
18945 mprotect(0xb7fad000, 8192, PROT_READ) = 0
18945 mprotect(0xb7fdb000, 4096, PROT_READ) = 0
18945 munmap(0xb7fb8000, 26772)         = 0
18945 time(NULL)                        = 1169873237
18945 brk(0)                            = 0x80d4000
18945 brk(0x80fd000)                    = 0x80fd000
18945 uname({sys="Linux", node="stasis", ...}) = 0
18945 getpid()                          = 18945
18945 open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 3
18945 read(3, "k\273\36\347", 4)        = 4
18945 fcntl64(3, F_GETFD)               = 0
18945 fcntl64(3, F_SETFD, FD_CLOEXEC)   = 0
18945 getgid32()                        = 0
18945 setgid32(65534)                   = 0
18945 setgroups32(1, [65534])           = 0
18945 setuid32(65534)                   = 0
18945 setuid32(0)                       = -1 EPERM (Operation not
permitted) 18945 getgid32()                        = 65534
18945 getegid32()                       = 65534
18945 setgid32(0)                       = -1 EPERM (Operation not
permitted) 18945 gettimeofday({1169873237, 140240}, {300, 0}) = 0
18945 epoll_create(128)                 = 4
18945 fcntl64(4, F_GETFD)               = 0
18945 fcntl64(4, F_SETFD, FD_CLOEXEC)   = 0
18945 SYS_291(0x80dd300, 0x18, 0x80dd300, 0x80d2e64, 0xbf95a3ec) = 5
18945 fcntl64(5, F_GETFD)               = 0
18945 fcntl64(5, F_SETFD, FD_CLOEXEC)   = 0
18945 rt_sigaction(SIGINT, {0x80ba3c0, [], 0}, NULL, 8) = 0
18945 pipe([6, 7])                      = 0
18945 fcntl64(6, F_GETFD)               = 0
18945 fcntl64(6, F_SETFD, FD_CLOEXEC)   = 0
18945 fcntl64(7, F_GETFD)               = 0
18945 fcntl64(7, F_SETFD, FD_CLOEXEC)   = 0
18945 epoll_ctl(4, EPOLL_CTL_ADD, 6,
{EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=135127920, u64=135127920}})
= 0 18945 rt_sigaction(SIGTERM, {0x80ba3c0, [], 0}, NULL, 8) = 0
18945 rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
18945 rt_sigaction(SIGALRM, {0x80b9ec0, [], 0}, NULL, 8) = 0
18945 epoll_ctl(4, EPOLL_CTL_ADD, 2, {EPOLLERR|EPOLLHUP,
{u32=135128016, u64=135128016}}) = -1 EPERM (Operation not permitted)
18945 write(2, "\1Fio_loop_handle_add: epoll_ctl(1, 2): Operation not
permitted\ n", 63) = 63
18945 exit_group(89)                    = ?
18944 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 89}], 0,
NULL) = 1 8945
18944 --- SIGCHLD (Child exited) @ 0 (0) ---
18944 alarm(0)                          = 5
18944 close(3)                          = 0
18944 write(2, "Error: ", 7)            = 7
18944 write(2, "imap dump-capability process returned 89", 40) = 40
18944 write(2, "\n", 1)                 = 1
18944 exit_group(89)                    = ?

full strace available on request.  The size is 23KB (235 lines).

dovecot -n:
# /etc/dovecot/dovecot.conf
protocols: pop3 imap
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid: 225
last_valid_uid: 225
first_valid_gid: 225
last_valid_gid: 225
mmap_disable: yes
maildir_copy_with_hardlinks: yes
maildir_copy_preserve_filename: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/local/sbin/dovecot_pop3_wrapper
mail_plugins(default): quota imap_quota trash
mail_plugins(imap): quota imap_quota trash
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default): 
pop3_uidl_format(imap): 
pop3_uidl_format(pop3): %v-%u
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: plain login
  verbose: yes
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/run/dovecot/auth-client
      mode: 432
      user: vmail
      group: vmail
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmail
      group: vmail


-- 
Marshal Newrock
Ideal Solution, LLC - http://www.idealso.com


More information about the dovecot mailing list