+acl_getprofile:
+
+ # Determine the mail profile for this recipient.
+ # An empty string implies no match has been found.
+
+ warn set acl_m_rprf =
+
+ warn recipients = survey@popcon.debian.org
+ set acl_m_rprf = PopconMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn local_parts = +local_only_users
+ domains = +local_domains
+ hosts = !+debianhosts
+ set acl_m_rprf = localonly
+
+<%- if @is_mailrelay -%>
+ warn local_parts = +local_only_users
+ domains = +mailhubdomains
+ hosts = !+debianhosts
+ set acl_m_rprf = localonly
+
+<%- end -%>
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+<%- if @is_rtmaster -%>
+ warn domains = rt.debian.org
+ set acl_m_rprf = RTMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+<%- end -%>
+<%- if @is_bugsmx -%>
+ warn domains = bugs.debian.org
+ set acl_m_rprf = BugsMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+<%- end -%>
+<%- if @is_packagesmaster -%>
+ warn domains = packages.debian.org
+ set acl_m_rprf = PackagesMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+<%- end -%>
+<%- if @is_packagesqamaster -%>
+ warn recipients = owner@packages.qa.debian.org : postmaster@packages.qa.debian.org
+ set acl_m_rprf = PTSOwner
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn senders = :
+ domains = packages.qa.debian.org
+ condition = ${if match{$local_part}{\N^bounces+\N}}
+ set acl_m_rprf = PTSListBounce
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = packages.qa.debian.org
+ set acl_m_rprf = PTSMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+<%- end -%>
+ warn recipients = change@db.debian.org : changes@db.debian.org : chpasswd@db.debian.org : ping@db.debian.org : recommend@nm.debian.org
+ set acl_m_rprf = DBSignedMail
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +virtual_domains
+ condition = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}}
+ condition = ${if eq{${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}{$value}{}}}{markup}}
+ set acl_m_rprf = markup
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +virtual_domains
+ condition = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}}
+ condition = ${if eq{${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}{$value}{}}}{blackhole}}
+ set acl_m_rprf = blackhole
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +virtual_domains
+ condition = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction.db}}}}
+ condition = ${if eq{${lookup{$local_part}dbmnz{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction.db}}}{$value}{}}}{markup}}
+ set acl_m_rprf = markup
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +virtual_domains
+ condition = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction.db}}}}
+ condition = ${if eq{${lookup{$local_part}dbmnz{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction.db}}}{$value}{}}}{blackhole}}
+ set acl_m_rprf = blackhole
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +local_domains
+ condition = ${if eq{${lookup{$local_part}dbmnz{/var/lib/misc/${primary_hostname}/mail-contentinspectionaction.db}{$value}{}}}{markup}}
+ set acl_m_rprf = markup
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn domains = +local_domains
+ condition = ${if eq{${lookup{$local_part}dbmnz{/var/lib/misc/${primary_hostname}/mail-contentinspectionaction.db}{$value}{}}}{blackhole}}
+ set acl_m_rprf = blackhole
+
+ accept condition = ${if !eq {$acl_m_rprf}{}}
+
+ warn set acl_m_rprf = normal
+
+ accept
+