Setting up the outbound proxy with Postfix

This is an example on connecting Postfix to dkimproxy.out for signing
outbound messages. This example uses Postfix's "After-Queue filter" feature.
We trigger the filter on messages sent via SMTP on port 587
(the submission port). Messages that trigger the filter get
sent to port 10027 where dkimproxy.out is listening.
Dkimproxy.out processes the message and forwards the connection back to
Postfix on port 10028.

Note- I used port 587 as the trigger here, rather than port 25,
because only authorized outgoing email should be signed. Typically port 25
is used to receive incoming email (which should not get a signature).
Port 587 on the other hand, can be locked down to only allow outgoing email.

In master.cf we modify the "submission" smtp listener service (it runs on
port 587). We add parameters telling Postfix to filter these messages
to port 10027 (where dkimproxy.out is listening) and to only allow
messages from our network and users who can authenticate using SASL.
We create a "transport" named dksign which is used to deliver messages to
the filter. Finally, we create a smtp listener for receiving processed
messages from dkimproxy.out on port 10028.