# ------------------------------------------------------------------
#
#    Copyright (C) 2009-2011 Canonical Ltd.
#    Copyright (C) 2013-2020 Christian Boltz
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
# vim: ft=apparmor

abi <abi/4.0>,

include <tunables/global>

profile dovecot-imap-login /usr/lib*/dovecot/imap-login {
  include <abstractions/base>
  include <abstractions/dovecot-common>

  capability dac_override,
  capability setuid,
  capability sys_chroot,

  network inet stream,
  network inet6 stream,
  network unix stream,

  /usr/lib*/dovecot/imap-login mr,
  @{run}/dovecot/anvil rw,
  @{run}/dovecot/login-master-notify* rw,
  @{run}/dovecot/login/ r,
  @{run}/dovecot/login/* rw,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/usr.lib.dovecot.imap-login>
}
