unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Setting link file permission in home-files-service-type
@ 2023-03-20  0:55 c4droid
  2023-03-20  1:15 ` Felix Lechner via
  2023-03-21 14:15 ` Gary Johnson
  0 siblings, 2 replies; 4+ messages in thread
From: c4droid @ 2023-03-20  0:55 UTC (permalink / raw)
  To: help-guix

Hi, Guix!

I'm changing my mailing workflow from fetchmail + procmail + msmtp +
mutt to fdm + msmtp + mutt, configuration file is already prepared, the
fdm and msmtp configuration file need 600 permission, guix home
home-files-service-type give 644 default, have workaround for when
symlinking change permission for target file.

My home.scm configuration cut:
``` scheme
(home-environment
 (services
  (list
   (service home-files-service-type
            `((".fdm.conf" ,(local-file "dotfiles/fdm.conf"))
              (".msmtprc" ,(local-file "dotfiles/msmtprc")))))))
```


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting link file permission in home-files-service-type
  2023-03-20  0:55 Setting link file permission in home-files-service-type c4droid
@ 2023-03-20  1:15 ` Felix Lechner via
  2023-03-20  2:20   ` c4droid
  2023-03-21 14:15 ` Gary Johnson
  1 sibling, 1 reply; 4+ messages in thread
From: Felix Lechner via @ 2023-03-20  1:15 UTC (permalink / raw)
  To: c4droid; +Cc: help-guix

Hi,

On Sun, Mar 19, 2023 at 5:57 PM c4droid <c4droid@foxmail.com> wrote:
>
> I'm changing my mailing workflow [...] to fdm + msmtp + mutt,

I used msmtp for a while but discovered OpenSMTPd after switching to
Guix.  Never looked back. It's a lovely email program.

No pressure, but below is a config if you'd like to try it, too.

Kind regards
Felix

* * *

            (service opensmtpd-service-type
                     (opensmtpd-configuration
                      (shepherd-requirement '(networking))
                      (config-file
                       (plain-file "opensmtpd-configuration"
                                   "
table secrets file:/etc/mail/secrets

listen on lo port 25
listen on socket

action \"transmit\" relay host
\"smtp+tls://lechner-desktop@submission.us-core.com:587\" auth
<secrets> mail-from \"@us-core.com\"
match for any action \"transmit\"
"))))


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting link file permission in home-files-service-type
  2023-03-20  1:15 ` Felix Lechner via
@ 2023-03-20  2:20   ` c4droid
  0 siblings, 0 replies; 4+ messages in thread
From: c4droid @ 2023-03-20  2:20 UTC (permalink / raw)
  To: Felix Lechner; +Cc: help-guix

Hi, Felix
I'll take a look and try opensmtpd, if possible, I'll let opensmtpd
become a home service.

On Sun, Mar 19, 2023 at 06:15:18PM -0700, Felix Lechner wrote:
> Hi,
> 
> On Sun, Mar 19, 2023 at 5:57 PM c4droid <c4droid@foxmail.com> wrote:
> >
> > I'm changing my mailing workflow [...] to fdm + msmtp + mutt,
> 
> I used msmtp for a while but discovered OpenSMTPd after switching to
> Guix.  Never looked back. It's a lovely email program.
> 
> No pressure, but below is a config if you'd like to try it, too.
> 
> Kind regards
> Felix
> 
> * * *
> 
>             (service opensmtpd-service-type
>                      (opensmtpd-configuration
>                       (shepherd-requirement '(networking))
>                       (config-file
>                        (plain-file "opensmtpd-configuration"
>                                    "
> table secrets file:/etc/mail/secrets
> 
> listen on lo port 25
> listen on socket
> 
> action \"transmit\" relay host
> \"smtp+tls://lechner-desktop@submission.us-core.com:587\" auth
> <secrets> mail-from \"@us-core.com\"
> match for any action \"transmit\"
> "))))
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting link file permission in home-files-service-type
  2023-03-20  0:55 Setting link file permission in home-files-service-type c4droid
  2023-03-20  1:15 ` Felix Lechner via
@ 2023-03-21 14:15 ` Gary Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Johnson @ 2023-03-21 14:15 UTC (permalink / raw)
  To: c4droid; +Cc: help-guix

c4droid <c4droid@foxmail.com> writes:

> I'm changing my mailing workflow from fetchmail + procmail + msmtp +
> mutt to fdm + msmtp + mutt, configuration file is already prepared, the
> fdm and msmtp configuration file need 600 permission, guix home
> home-files-service-type give 644 default, have workaround for when
> symlinking change permission for target file.
>
> My home.scm configuration cut:
> ``` scheme
> (home-environment
>  (services
>   (list
>    (service home-files-service-type
>             `((".fdm.conf" ,(local-file "dotfiles/fdm.conf"))
>               (".msmtprc" ,(local-file "dotfiles/msmtprc")))))))
> ```

As mentioned on another thread recently, you need to pass the
`#:recursive? #t` option to `local-file` if you want to preserve your
file permissions.

``` scheme
(home-environment
 (services
  (list
   (service home-files-service-type
            `((".fdm.conf" ,(local-file "dotfiles/fdm.conf" #:recursive? #t))
              (".msmtprc" ,(local-file "dotfiles/msmtprc" #:recursive? #t)))))))
```

Happy hacking!
  Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-21 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20  0:55 Setting link file permission in home-files-service-type c4droid
2023-03-20  1:15 ` Felix Lechner via
2023-03-20  2:20   ` c4droid
2023-03-21 14:15 ` Gary Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).