Skip to content

Commit

Permalink
🍕 Fix problems on DKIM
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Fitz Abucay <ffimnsr@gmail.com>
  • Loading branch information
ffimnsr committed Oct 20, 2023
1 parent 80b62ec commit 63197ab
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: build-push-release
name: build-push-release-images
on:
push:
tags:
tags:
- 'release-*.*.*'

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
Expand Down
6 changes: 3 additions & 3 deletions data/s6-overlay/s6-rc.d/init-mailer-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ mkdir -p /var/spool/postfix/pid \
&& chown -R 0:0 /var/spool/postfix/pid

mkdir -p /var/spool/postfix/opendkim \
&& chown -R opendkim:postfix /var/spool/postfix/opendkim
&& chown -R 0:0 /var/spool/postfix/opendkim

mkdir /run/opendkim \
&& chown -R opendkim:opendkim /run/opendkim
&& chown -R 0:0 /run/opendkim

TEMPLATES_DIR=/etc/templates
dockerize \
Expand Down Expand Up @@ -54,7 +54,7 @@ if [[ ! -d "${OPENDKIM_KEYS_DIR}" ]]; then
echo "Creating DKIM keys for $JMAIL_ORIGIN"
mkdir -p $OPENDKIM_KEYS_DIR
opendkim-genkey -b 1024 -d $JMAIL_ORIGIN -D $OPENDKIM_KEYS_DIR -s sendonly
chown -R opendkim: $OPENDKIM_KEYS_DIR/sendonly.private
chown -R 0:0 $OPENDKIM_KEYS_DIR/sendonly.private
fi

cat $OPENDKIM_KEYS_DIR/sendonly.txt
2 changes: 1 addition & 1 deletion data/templates/opendkim/key.table.tmpl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sendonly._domainkey.{{ .Env.JMAIL_ORIGIN }} {{ .Env.JMAIL_ORIGIN}}:sendonly:/etc/opendkim/keys/{{ .Env.JMAIL_ORIGIN }}/sendonly.private
sendonly._domainkey.{{ .Env.JMAIL_ORIGIN }} {{ .Env.JMAIL_ORIGIN }}:sendonly:/etc/opendkim/keys/{{ .Env.JMAIL_ORIGIN }}/sendonly.private
1 change: 0 additions & 1 deletion data/templates/opendkim/opendkim.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ Socket local:/var/spool/postfix/opendkim/opendkim.sock

ReportAddress postmaster@{{ .Env.JMAIL_ORIGIN }}
SendReports yes
UserID opendkim

InternalHosts refile:/etc/opendkim/trusted.hosts
1 change: 1 addition & 0 deletions data/templates/opendkim/signing.table.tmpl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*@{{ .Env.JMAIL_ORIGIN }} sendonly._domainkey.{{ .Env.JMAIL_ORIGIN }}
*@*.{{ .Env.JMAIL_ORIGIN }} sendonly._domainkey.{{ .Env.JMAIL_ORIGIN }}
1 change: 1 addition & 0 deletions data/templates/opendkim/trusted.hosts.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ localhost
172.16.0.0/12
192.168.0.0/16

{{ .Env.JMAIL_ORIGIN }}
*.{{ .Env.JMAIL_ORIGIN }}
2 changes: 2 additions & 0 deletions data/templates/postfix/generic.tmpl
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
root@{{ .Env.JMAIL_ORIGIN }} noreply@{{ .Env.JMAIL_ORIGIN }}
root@localhost noreply@{{ .Env.JMAIL_ORIGIN }}
root@localhost.localdomain noreply@{{ .Env.JMAIL_ORIGIN }}
2 changes: 1 addition & 1 deletion data/templates/postfix/main.cf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ allow_percent_hack = no

myhostname = {{ .Env.JMAIL_HOSTNAME }}
myorigin = {{ .Env.JMAIL_ORIGIN }}
mydestination = localhost.local, localhost.localdomain, localhost
mydestination = localhost.localdomain, localhost
mynetworks = 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 127.0.0.0/8

# Incoming
Expand Down

0 comments on commit 63197ab

Please sign in to comment.