# standard standalone server implementation

START {
  # do not delete this entry!
  recover       cmd="ctl_cyrusdb -r"

  # this is only necessary if using idled for IMAP IDLE
  idled         cmd="idled"

  #sync

# problem if sync server not up - stalls others - handled by crontab

# syncclient	cmd="sync_client -v -l -d 5 -r -t 300"

}

# UNIX sockets start with a slash and are put into /var/imap/sockets
SERVICES {
  # add or remove based on preferences
  imap          cmd="imapd" listen="imap" prefork=5 provide_uuid=1
  imaps         cmd="imapd -s" listen="imaps" prefork=10 provide_uuid=1
  pop3          cmd="pop3d" listen="pop3" prefork=5
  pop3s         cmd="pop3d -s" listen="pop3s" prefork=5
  sieve         cmd="timsieved" listen="sieve" prefork=5

  # these are only necessary if receiving/exporting usenet via NNTP
#  nntp         cmd="nntpd" listen="nntp" prefork=3
#  nntps                cmd="nntpd -s" listen="nntps" prefork=1

  # at least one LMTP is required for delivery
#  lmtp         cmd="lmtpd" listen="lmtp" prefork=3
  lmtpunix      cmd="lmtpd" listen="/common/imap/socket/lmtp" prefork=5 provide_uuid=1

  # this is only necessary if using notifications
#  notify       cmd="notifyd" listen="/common/imap/socket/notify" proto="udp" prefork=1

}

EVENTS {
  # this is required
  checkpoint    cmd="ctl_cyrusdb -c" period=30

  # this is only necessary if using duplicate delivery suppression,
  # Sieve or NNTP
  delprune      cmd="cyr_expire -E 3" at=0400

  # this is only necessary if caching TLS sessions
  tlsprune      cmd="tls_prune" at=0400

  # Clean up Trash folders
  trashprune1	cmd="ipurge -f -d 21 user.%.Trash" at=2100
  trashprune2	cmd="ipurge -f -d 21 user.%.trash" at=2130

  # Purge quarantine mailboxes older than 14 days at 3 am
  purgespam	cmd="ipurge -f -d 14 user.%.quarantine" at=0300
  purgespam2	cmd="ipurge -f -d 2 user.%.spam" at=0330
  purgebacula	cmd="ipurge -f -d 28 user.support.Bacula" at=0400

}
