sign gpg messages
This commit is contained in:
parent
ac8ac7c6d6
commit
db2a7f8aff
4 changed files with 38 additions and 4 deletions
|
@ -83,7 +83,7 @@ function getTemplate(template, callback) {
|
|||
}
|
||||
|
||||
function createMailer(callback) {
|
||||
settings.list(['smtpHostname', 'smtpPort', 'smtpEncryption', 'smtpUser', 'smtpPass', 'smtpLog', 'smtpDisableAuth', 'smtpMaxConnections', 'smtpMaxMessages', 'smtpSelfSigned'], (err, configItems) => {
|
||||
settings.list(['smtpHostname', 'smtpPort', 'smtpEncryption', 'smtpUser', 'smtpPass', 'smtpLog', 'smtpDisableAuth', 'smtpMaxConnections', 'smtpMaxMessages', 'smtpSelfSigned', 'pgpPrivateKey', 'pgpPassphrase'], (err, configItems) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
@ -109,7 +109,10 @@ function createMailer(callback) {
|
|||
rejectUnauthorized: !configItems.smtpSelfSigned
|
||||
}
|
||||
});
|
||||
module.exports.transport.use('stream', openpgpEncrypt());
|
||||
module.exports.transport.use('stream', openpgpEncrypt({
|
||||
signingKey: configItems.pgpPrivateKey,
|
||||
passphrase: configItems.pgpPassphrase
|
||||
}));
|
||||
|
||||
return callback(null, module.exports.transport);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue