1

Why there is no tls_sessions.db file and how to fix this error?

So I finally decided to go with Cyrus for my mail server. (I'm still deciding exim4 or postfix though)

I installed those packages:

sudo apt install cyrus-imapd cyrus-common cyrus-admin cyrus-caldav cyrus-clients cyrus-doc cyrus-murder cyrus-nntpd cyrus-replication sasl2-bin

I had to jump between their Debian installation process and their Quickstart process. (Documentation here).

The testsaslauthd command always returned connect() : No such file or directory.

/var/log/mail.log shows :

Sep  9 06:24:23 server-2 cyrus/ctl_cyrusdb[13282]: skiplist: clean shutdown file missing, updating recovery stamp
Sep  9 06:24:23 server-2 cyrus/ctl_cyrusdb[13282]: recovering cyrus databases
Sep  9 06:24:23 server-2 cyrus/ctl_cyrusdb[13282]: done recovering cyrus databases
Sep  9 06:24:23 server-2 cyrus/cyr_expire[13285]: Expired 0 and expunged 0 out of 0 messages from 0 mailboxes
Sep  9 06:24:23 server-2 cyrus/cyr_expire[13285]: duplicate_prune: pruning back 3.00 days
Sep  9 06:24:23 server-2 cyrus/cyr_expire[13285]: duplicate_prune: purged 0 out of 0 entries
Sep  9 06:24:23 server-2 cyrus/tls_prune[13288]: DBERROR: opening /var/lib/cyrus/tls_sessions.db: cyrusdb error
Sep  9 06:24:23 server-2 cyrus/master[13281]: process type:START name:tlsprune path:/usr/sbin/cyrus age:0.000s pid:13288 exited, status 1
Sep  9 06:24:23 server-2 cyrus/master[13281]: can't run startup
Sep  9 06:24:23 server-2 cyrus/master[13281]: exiting

Indeed the tls_sessions.db file is missing but the only thing I read was a while back and it says the file is created once a TLS connection is made for the first time.

I will run it only in TLS mode but I would like it to work first :)

How can I create the tls database or what am I missing? Thanks!

Jeremy Dicaire
  • 165
  • 1
  • 5
  • 15

1 Answers1

2

Just create an empty file:

# touch /var/lib/cyrus/tls_sessions.db
# chown cyrus:mail tls_sessions.db
pmhahn
  • 106
  • 7
  • this leads me to `DBERROR db5: BDB0004 fop_read_meta: /var/lib/cyrus/tls_sessions.db: unexpected file type or format` ?! – Max Jun 09 '19 at 07:26
  • That error can be ignored - the error if from `dbopen()`as the empty does not match the expected format, but it will replace it anyway and thus fix the error. You could use other tools to create a valid empty DB, but as there are many different formats, it's a waste of energy and easier to just create an empty file and live with the one-time (harmless) error message. – pmhahn Sep 09 '19 at 08:13