# ------------------------------------------------------------------
#
#    Copyright (C) 2002-2005 Novell/SUSE
#    Copyright (C) Per Jessen <per@computer.org>
#
#    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:syntax=apparmor

abi <abi/3.0>,

include <tunables/global>

/usr/bin/mlmmj-maintd {
  include <abstractions/base>

  capability setuid,

  /usr/bin/mlmmj-maintd mr,
  /usr/bin/mlmmj-send Px,
  /usr/bin/mlmmj-bounce Px,
  /usr/bin/mlmmj-unsub Px,

  /var/spool/mlmmj/ r,
  /var/spool/mlmmj/* r, #
  /var/spool/mlmmj/*/bounce/ r,
  /var/spool/mlmmj/*/bounce/* rw,
  /var/spool/mlmmj/*/index r,
  /var/spool/mlmmj/*/lastdigest rwk,
  /var/spool/mlmmj/*/maintdlog-* lrw,
  /var/spool/mlmmj/*/mlmmj-maintd.lastrun.log w,
  /var/spool/mlmmj/*/moderation/ r,
  /var/spool/mlmmj/*/moderation/* w,
  /var/spool/mlmmj/*/archive/ r,
  /var/spool/mlmmj/*/archive/* r,
  /var/spool/mlmmj/*/control/ r,
  /var/spool/mlmmj/*/control/* r,
  /var/spool/mlmmj/*/queue/ r,
  /var/spool/mlmmj/*/queue/** rwl,
  /var/spool/mlmmj/*/requeue/ r,
  /var/spool/mlmmj/*/requeue/* rw,
  /var/spool/mlmmj/*/requeue/*/ rw,
  /var/spool/mlmmj/*/subconf/ r,
  /var/spool/mlmmj/*/subconf/* rw,
  /var/spool/mlmmj/*/unsubconf/ r,
  /var/spool/mlmmj/*/unsubconf/* rw,

  /usr/share/mlmmj/text.skel/*/digest r,
  /var/spool/mlmmj/*/mlmmj.operation.log rwk,

}
