# vim: ft=apparmor
# ------------------------------------------------------------------
#
#    Copyright (c) 2009 Dulmandakh Sukhbaatar <dulmandakh@gmail.com>
#    Copyright (C) 2009-2011 Canonical Ltd.
#    Copyright (C) 2013-2020 Christian Boltz
#    Copyright (C) 2014 Christian Wittmer
#
#    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.
#
# ------------------------------------------------------------------

abi <abi/4.0>,

include <tunables/global>

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

  capability setuid,
  capability sys_chroot,

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

  @{exec_path} mr,
  @{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.managesieve-login>
}
