Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:anope
User: [email protected]
Usertags: pu

[ Reason ]
Core functionality (sending email for password resets) was broken
since 2.0.7-1 in 2020 
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036857)

[ Impact ]
Users could not reset passwords.

[ Tests ]
The update has been tested on a production anope installation.

[ Risks ]
Safe change to apparmor profile, only extending permissions.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]

Allow anope to send email via common MTAs shipped with Debian
in its apparmor profile.

[ Other info ]
N/A
diff -Nru anope-2.0.17/debian/apparmor/usr.sbin.anope 
anope-2.0.17/debian/apparmor/usr.sbin.anope
--- anope-2.0.17/debian/apparmor/usr.sbin.anope 2026-11-22 15:40:50.000000000 
+0000
+++ anope-2.0.17/debian/apparmor/usr.sbin.anope 2026-11-24 10:17:19.000000000 
+0000
@@ -31,4 +31,19 @@
   /usr/lib{,32,64}/** mr,
   /usr/sbin/anope ixr,
 
+  # Sending mail: anope runs mail:sendmailpath via popen(), i.e.
+  # "/bin/sh -c <sendmailpath>".
+  /{usr/,}bin/{sh,dash,bash} ixr,
+
+  # The MTA's sendmail interface needs the MTA's own config and spool, so
+  # run it under its own profile if it has one, otherwise unconfined.
+  # AppArmor matches the symlink target, so list the common MTAs.
+  /usr/sbin/sendmail PUx,   # postfix, nullmailer, sendmail, opensmtpd
+  /usr/sbin/exim4 PUx,      # exim4 (/usr/sbin/sendmail -> exim4)
+  /usr/bin/msmtp PUx,       # msmtp-mta
+  /usr/sbin/ssmtp PUx,      # ssmtp
+  /usr/sbin/dma PUx,        # dma
+
+  # Site-specific additions (e.g. a non-default sendmailpath).
+  include if exists <local/usr.sbin.anope>
 }
diff -Nru anope-2.0.17/debian/changelog anope-2.0.17/debian/changelog
--- anope-2.0.17/debian/changelog       2026-11-22 15:40:50.000000000 +0000
+++ anope-2.0.17/debian/changelog       2026-11-27 16:45:03.000000000 +0000
@@ -1,3 +1,9 @@
+anope (2.0.17-1+deb13u2) trixie; urgency=medium
+
+  * Fix apparmor profile to permit sending mail (Closes: #1036857)
+
+ -- Dominic Hargreaves <[email protected]>  Fri, 27 Nov 2026 16:45:03 +0000
+
 anope (2.0.17-1+deb13u1) trixie-security; urgency=high
 
   * Fix multiple security issues cherry-picked from 2.0.21 including

Reply via email to