# ------------------------------------------------------------------
#
#    Copyright (C) 2002-2006 Novell/SUSE
#    Copyright (C) 2018 Canonical, Ltd.
#
#    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/3.0>,

include <tunables/global>

profile postfix-qmgr /usr/lib/postfix/{bin/,sbin/,}qmgr {
  include <abstractions/base>
  include <abstractions/nameservice>
  include <abstractions/postfix-common>

  /usr/lib/postfix/{bin/,sbin/,}qmgr                              mrix,

  /{var/spool/postfix/,}active/                                   r,
  /{var/spool/postfix/,}active/[0-9A-F]/[0-9A-F]/*                rwl,
  /{var/spool/postfix/,}active/[0-9A-F]/[0-9A-F]/                 rwl,
  /{var/spool/postfix/,}active/[0-9A-F]/                          rwl,
  /{var/spool/postfix/,}active/[0-9A-F]*                          rwlk,
  /{var/spool/postfix/,}bounce/[0-9A-F]*                          w,
  /{var/spool/postfix/,}defer/                                    r,
  /{var/spool/postfix/,}defer/[0-9A-F]/[0-9A-F]/*                 rwl,
  /{var/spool/postfix/,}defer/[0-9A-F]/[0-9A-F]/                  rwl,
  /{var/spool/postfix/,}defer/[0-9A-F]/                           rwl,
  /{var/spool/postfix/,}defer/[0-9A-F]/*                          w,
  /{var/spool/postfix/,}deferred/                                 r,
  /{var/spool/postfix/,}deferred/[0-9A-F]/[0-9A-F]/*              rwl,
  /{var/spool/postfix/,}deferred/[0-9A-F]/[0-9A-F]/               rwl,
  /{var/spool/postfix/,}deferred/[0-9A-F]/*                       rw,
  /{var/spool/postfix/,}deferred/[0-9A-F]/                        rwl,
  /{var/spool/postfix/,}incoming/                                 r,
  /{var/spool/postfix/,}incoming/[0-9A-F]/[0-9A-F]/*              rwl,
  /{var/spool/postfix/,}incoming/[0-9A-F]/[0-9A-F]/               rwl,
  /{var/spool/postfix/,}incoming/[0-9A-F]/                        rwl,
  /{var/spool/postfix/,}incoming/[0-9A-F]*                        rwl,
  /{var/spool/postfix/,}public/flush                              w,
  /{var/spool/postfix/,}public/qmgr                               r,
  /{var/spool/postfix/,}private/bounce                            w,
  /{var/spool/postfix/,}private/defer                             w,
  /{var/spool/postfix/,}private/local                             rw,
  /{var/spool/postfix/,}private/relay                             w,
  /{var/spool/postfix/,}private/rewrite                           rw,
  /{var/spool/postfix/,}private/smtp                              w,
  /{var/spool/postfix/,}private/trace                             w,
  /{var/spool/postfix/,}private/uucp                              w,
}
