Posts

Showing posts with the label opendkim

How to Configure DKIM (OpenDKIM) with Postfix

Image
Install OpenDKIM and Postfix sudo apt install opendkim opendkim-tools postfix Configure OpenDKIM OpenDKIM can add DKIM signatures to outbound mail and check DKIM signatures on inbound mail. It can be configured to reject mail that has missing or invalid DKIM signatures. Create a directory structure that will store trusted hosts, key tables, signature tables, and crypto keys: sudo mkdir /etc/opendkim sudo mkdir /etc/opendkim/keys # or one line sudo mkdir -p /etc/opendkim/keys Generate the key pair for your DNS domain and selector: For key generation, the opendkim-tools package provides the opendkim-genkey program. This program generates a private key named  <my_selector>.private  in the specified directory, as well as a public key  <my_selector>.txt  ready to be included in a bind DNS zone file. sudo -u opendkim opendkim-genkey -D /etc/opendkim/keys -d my-domain.org -s my_selector Now, edit  /etc/opendkim.conf . For the socket, the easiest option i...