control: severity -1 wishlist
control: tag -1 +patch

Dear Simon,

On Tue, Aug 27, 2019 at 1:26 AM Simon Deziel <[email protected]> wrote:
>
> This permission denied is likely due to Apparmor not letting msmtp
> access a "random file". The Apparmor profile only allows reading the
> config from a few different locations and the rest is denied. Please
> consult the NEWS file for details and/or the profile itself:
> /etc/apparmor.d/usr.bin.msmtp
>
> The NEWS file provides possible workarounds to support your
> "non-standard" setup. If you have any questions after that, please let
> us know!

Thanks for the hint!
Yes, I confirm it's an apparmor issue after checking dmesg log.
And I added one line to /etc/apparmor.d/usr.bin.msmtp to fix my problem.

Enclosed is the patch.
I think since "dot_msmtprc" can be the user setting file, why not
adding another "_msmtprc"?
And it's no harm. :-P

Cheers,
Roger
From 7ea26a5b8e1ca0f17f0565ce76a8f4db57920b90 Mon Sep 17 00:00:00 2001
From: Roger Shimizu <[email protected]>
Date: Wed, 28 Aug 2019 18:27:22 +0900
Subject: [PATCH] apparmor: Add _msmtprc as allowed user configure file

---
 debian/apparmor/usr.bin.msmtp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/apparmor/usr.bin.msmtp b/debian/apparmor/usr.bin.msmtp
index c8109fd..819d944 100644
--- a/debian/apparmor/usr.bin.msmtp
+++ b/debian/apparmor/usr.bin.msmtp
@@ -21,6 +21,7 @@
   /var/log/msmtp            wk,
 
   owner @{HOME}/**/.msmtprc        r,
+  owner @{HOME}/**/_msmtprc        r,
   owner @{HOME}/**/dot_msmtprc     r,
   owner @{HOME}/.config/msmtp/*    r,
   owner @{HOME}/.cache/msmtp/*     r,
-- 
2.20.1

Reply via email to