-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration #12
Comments
|
@andris9 Could you clarify the configuration of DKIM feature, please? I don't find a way in the TOML file to specify the domain, the selector, or the place where to read the corresponding private certificate. Thanks in advance Fred |
ZoneMTA is more like a framework than a final MTA application. So the DKIM plugin is just an example and does not do much. You are supposed to write your own dkim plugin and load keys from whatever storage you use, either from file system or database or wherever. Minimal DKIM plugin would look like this: 'use strict';
module.exports.title = 'DKIM signer';
module.exports.init = function (app, done) {
// this hook is triggered when a connection is established to MX
app.addHook('sender:connection', (delivery, options, next) => {
// 1. resolve domain name to be used for signing
let from = delivery.envelope.from || '';
let fromDomain = from.substr(from.lastIndexOf('@') + 1).toLowerCase();
// 2. load the key data from somewhere for `fromDomain`
// 3. add key to DKIM handler assuming that `fromDomain` is "example.com" and dkim selector is "test"
delivery.dkim.keys.push({
domainName: 'example.com',
keySelector: 'test',
privateKey: '---- BEGIN RSA PRIVATE KEY...',
});
next();
});
done();
}; |
If you want to use header From: address domain for signing then use |
Hi,
In first, thanks for this great work.
I followed the deployment instructions and get a running server. But, I encounter some issues during invocation thru swaks. So, my main question is:
Another question:
Thanks in advance for the answers
Fred
The text was updated successfully, but these errors were encountered: