doc:appunti:linux:sa:postfix_opendkim
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:linux:sa:postfix_opendkim [2022/05/23 11:23] – [Configure Postfix] niccolo | doc:appunti:linux:sa:postfix_opendkim [2023/10/31 10:52] – [OpenDKIM on Postfix with virtual domains] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== OpenDKIM on Postfix with virtual domains ====== | ====== OpenDKIM on Postfix with virtual domains ====== | ||
- | In this article | + | In this tutorial |
< | < | ||
apt install opendkim opendkim-tools | apt install opendkim opendkim-tools | ||
</ | </ | ||
+ | |||
+ | In Debian 11 Bullseye the service is controlled (enable, start, stop, etc.) by Systemd: | ||
+ | |||
+ | < | ||
+ | systemctl status opendkim.service | ||
+ | </ | ||
+ | |||
+ | Because Postfix is running into a chroot, it cannot access the ''/ | ||
+ | |||
+ | < | ||
+ | Socket | ||
+ | </ | ||
+ | |||
+ | The same daemon is used both for signing and verifying. Signing is performed when the **From:** address matches the domains to be signed (see the command line option **%%-d%%** or the **SigningTable** option of the ''/ | ||
===== Create the keys in / | ===== Create the keys in / | ||
Line 45: | Line 59: | ||
</ | </ | ||
- | ===== Add the domain to be signed ===== | + | ===== Add the domain |
Into the file **/ | Into the file **/ | ||
Line 63: | Line 77: | ||
===== Configure OpenDKIM ===== | ===== Configure OpenDKIM ===== | ||
- | Into the **/ | + | Into the **/ |
< | < | ||
Line 120: | Line 134: | ||
</ | </ | ||
- | Havig done this, we define the custom **mua_milters** directive in '' | + | Having |
< | < | ||
- | # Locally generated mails are filtered with OpenDKIM. | + | # Locally generated mails (e.g. from command line Mutt) are filtered with OpenDKIM. |
non_smtpd_milters = inet: | non_smtpd_milters = inet: | ||
- | # Uncomment if you want OpenDKIM | + | # Mails received via SMTP protocol are filtered with OpenDKIM; |
- | #smtpd_milters = inet: | + | # messages |
+ | smtpd_milters = inet: | ||
- | # Restriction | + | # Filters |
mua_milters = | mua_milters = | ||
unix: | unix: | ||
inet: | inet: | ||
+ | </ | ||
+ | |||
+ | Another important Postfix setting is **milter_default_action**, | ||
+ | |||
+ | < | ||
+ | milter_default_action = tempfail | ||
</ | </ | ||
===== Logging ===== | ===== Logging ===== | ||
- | When a message passes through the OpenDKIM filter, you get the following into **mail.log**: | + | When a message passes through the OpenDKIM filter, you get the following |
< | < | ||
Line 143: | Line 164: | ||
</ | </ | ||
- | If a message does not match any entry in **/ | + | If a message does not match any entry in **/ |
< | < |
doc/appunti/linux/sa/postfix_opendkim.txt · Last modified: 2023/10/31 11:06 by niccolo