AWS SES from NodeJS not DKIM signed?

∥☆過路亽.° 提交于 2019-12-12 02:18:37

问题


I am using nodemailer to send emails using SES

const nodemailer = require('nodemailer')
const sesTransport = require('nodemailer-ses-transport')

const transporter = nodemailer.createTransport(sesTransport({
  accessKeyId: '...',
  secretAccessKey: '...',
  region: 'us-east-1'
}))

When I try to send test emails from AWS SES Dashboard, it works. But when I send via code, it goes into spam. I've already followed the steps to "enable easy DKIM" http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html. When I check the verification status of DKIM on AWS Dashboard, its verified. Do I need to explicitly sign emails when sending via code? In the example from https://nodemailer.com/dkim/, I need a private key. Which private key isit? Where do I get it? Also what values do I put into domainName and keySelector?

let transporter = nodemailer.createTransport({
    service: 'Gmail',
    dkim: {
        domainName: 'example.com',
        keySelector: '2017',
        privateKey: '-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBg...'
    }
});

回答1:


Ok so I can close this. It appears nodemailer didnt correctly sign emails using DKIM. Using AWS SDK directly and calling setIdentityDkimEnabled to enable DKIM fixes things.



来源:https://stackoverflow.com/questions/42429881/aws-ses-from-nodejs-not-dkim-signed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!