Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ TLS and OpenDKIM support are optional.
-v /path/to/domainkeys:/etc/opendkim/domainkeys \
--name postfix -d catatnight/postfix
```
You may specify key selector if selector *mail* is already allocated by passing keyselector environment variable.
In this case $keyselector.private will be searched in /etc/opendkim/domainkeys inside container.

```bash
$ sudo docker run -p 25:25 \
-e maildomain=mail.example.com -e keyselector=app \
-e smtp_user=user:pwd \
-v /path/to/domainkeys:/etc/opendkim/domainkeys \
--name postfix -d catatnight/postfix
```

3. Enable TLS(587): save your SSL certificates ```.key``` and ```.crt``` to ```/path/to/certs```

```bash
Expand Down
8 changes: 4 additions & 4 deletions assets/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ localhost
*.$maildomain
EOF
cat >> /etc/opendkim/KeyTable <<EOF
mail._domainkey.$maildomain $maildomain:mail:$(find /etc/opendkim/domainkeys -iname *.private)
$keyselector._domainkey.$maildomain $maildomain:mail:$(find /etc/opendkim/domainkeys -iname $keyselector.private)
EOF
cat >> /etc/opendkim/SigningTable <<EOF
*@$maildomain mail._domainkey.$maildomain
*@$maildomain $keyselector._domainkey.$maildomain
EOF
chown opendkim:opendkim $(find /etc/opendkim/domainkeys -iname *.private)
chmod 400 $(find /etc/opendkim/domainkeys -iname *.private)
chown opendkim:opendkim $(find /etc/opendkim/domainkeys -iname $keyselector.private)
chmod 400 $(find /etc/opendkim/domainkeys -iname $keyselector.private)