1
0

Update home/.chezmoi.toml

Add home/.chezmoiignore
Add home/backup/chezmoi.toml
Add home/backup/.msmtprc
Change attributes of home/backup/.mbsyncrc
This commit is contained in:
Jeff Lance 2024-03-04 20:37:03 +01:00
parent dcb8e7ea88
commit 3469e66455
5 changed files with 42 additions and 16 deletions

View File

@ -1,18 +1,2 @@
[data]
email = {{ promptString "Git main email address " "" | quote }}
{{- with promptInt "How many mail accounts would you like to configure " 0 -}}{{- $count := . | int }}
{{- if gt $count 0 -}}
{{- range $i, $e := until $count }}
[[data.mail]]
comment = {{ promptString "Mail description " | quote }}
account = {{ promptString "Mail account name " | quote }}
address = {{ promptString "Mail address " | quote }}
usrname = {{ promptString "Mail username " | quote }}
imapsrv = {{ promptString "Mail imap host " | quote }}
smtpsrv = {{ promptString "Mail smtp host " | quote }}
smtport = {{ promptInt "Mail smtp port " 465 }}
smtpaut = {{ promptChoice "Mail smtp auth " (list "on" "plain") "on" }}
autofro = {{ promptChoice "Auto from " (list "on" "off") "off" }}
{{- end }}
{{- end }}
{{- end }}

2
home/.chezmoiignore Normal file
View File

@ -0,0 +1,2 @@
backup/
backup/**

View File

@ -0,0 +1,18 @@
[data]
email = {{ promptString "Git main email address " "" | quote }}
{{- with promptInt "How many mail accounts would you like to configure " 0 -}}{{- $count := . | int }}
{{- if gt $count 0 -}}
{{- range $i, $e := until $count }}
[[data.mail]]
comment = {{ promptString "Mail description " | quote }}
account = {{ promptString "Mail account name " | quote }}
address = {{ promptString "Mail address " | quote }}
usrname = {{ promptString "Mail username " | quote }}
imapsrv = {{ promptString "Mail imap host " | quote }}
smtpsrv = {{ promptString "Mail smtp host " | quote }}
smtport = {{ promptInt "Mail smtp port " 465 | int }}
smtpaut = {{ promptChoice "Mail smtp auth " (list "on" "plain") "on" }}
autofro = {{ promptChoice "Auto from " (list "on" "off") "off" }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,22 @@
# Set default values for all following accounts.
defaults
auto_from on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
syslog on
# logfile /var/log/msmtp.log
{{ range $value := .mail }}
# {{ $value.comment }}
account {{ $value.account }}
host {{ $value.smtpsrv }}
port {{ $value.smtport }}
auth {{ $value.smtpaut }}
tls on
tls_starttls off
user {{ $value.usrname }}
passwordeval "echo $(pass {{ $value.smtpsrv }}/{{ $value.usrname }})"
auto_from {{ $value.autofro }}
from {{ $value.address }}
#
{{ end }}