# dovecot2 + postfix failing to start



## tagram (Jun 24, 2015)

Hi all,

After about a week of banging my head against the wall on this, it's time to reach out for help.

About a week ago, my VPS host crashed, which in turn meant I was in for rebuilding my dns/mail server.

After reinstalling a fresh copy of 10.1-RELEASE and updating it, I then restored /usr/local/etc/{dovecot,postfix,mail} and began reinstalling packages.

After mail/postfix was reinstalled, it started right up. mail/dovecot2 however, not so much... The service will start, but any attempts at connecting to it immediately fail. Below is the log errors and config details.

I appreciate any thoughts/feedback as I am quite surely at my wits end.

```
---the errors...
....
Jun 24 21:10:05 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth
Jun 24 21:10:05 auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Jun 24 21:10:05 auth: Error: auth: environment corrupt; missing value for DOVECOT_
Jun 24 21:10:05 auth: Fatal: unsetenv(RESTRICT_SETUID) failed: Bad address
Jun 24 21:10:05 master: Error: service(auth): command startup failed, throttling for 60 secs
....
eddie@charlie:~ % telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
eddie@charlie:~ %
```


```
---the details...
root@charlie:~ # pkg info | grep dovecot2
dovecot2-2.2.18  Secure, fast and powerful IMAP and POP3 server

root@charlie:~ # uname -ar
FreeBSD charlie.tagram.net 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

root@charlie:~ # doveconf -n
# 2.2.18: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 10.1-RELEASE-p10 amd64
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = sha1
debug_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = 2001
mail_home = /mailstore/domains/%d/%n
mail_location = maildir:~
mail_privileged_group = vpost
mail_uid = 1006
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
  special_use = \Drafts
  }
  mailbox Junk {
  special_use = \Junk
  }
  mailbox Sent {
  special_use = \Sent
  }
  mailbox "Sent Messages" {
  special_use = \Sent
  }
  mailbox Trash {
  special_use = \Trash
  }
  prefix =
}
passdb {
  args = scheme=CRYPT username_format=%u /usr/local/etc/dovecot/users
  driver = passwd-file
}
passdb {
  args = scheme=CRYPT username_format=%u /usr/local/etc/dovecot/users
  driver = passwd-file
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
  group = postfix
  mode = 0666
  user = postfix
  }
  unix_listener auth-userdb {
  mode = 0600
  user = vpost
  }
}
service imap-login {
  process_min_avail = 1
  service_count = 1
  vsz_limit = 32 M
}
ssl = no
userdb {
  args = username_format=%u /usr/local/etc/dovecot/users
  driver = passwd-file
}
userdb {
  args = username_format=%u /usr/local/etc/dovecot/users
  driver = passwd-file
}
verbose_ssl = yes
```


----------



## tony33 (Jun 27, 2015)

Did you fix your problem or do you still need help?


----------



## tagram (Jun 28, 2015)

Apologies for the delayed response, I do still need help with this issue. I am actively working on it now.


----------



## tagram (Jul 9, 2015)

Wow! I suspect the fix here is going to cost me a few points on my sysadmin card...

positfx vs. postfix in a config file, listing a path......


----------



## ShelLuser (Jul 9, 2015)

Did your Dovecot version change in the mean time? For example: I could see problems happening if you used mail/dovecot before and have now installed mail/dovecot2. Reason I wonder is because your issues seem to stern from your configuration.


----------



## junovitch@ (Jul 10, 2015)

tagram said:


> Wow! I suspect the fix here is going to cost me a few points on my sysadmin card...
> 
> positfx vs. postfix in a config file, listing a path......


Some services are a bit nicer about what they say when we do make a mistake but never discount the simple answers.  We've all done it at some point.


----------



## tony33 (Mar 18, 2016)

How did you fix your issue?


----------

