Message rejected under suspicion of SPAM Nodejs, Yandex, Firebase functions - node.js

I am trying to send email from my NodeJs Server using Yandex. Below is the process of creating transporter
let transporter = nodemailer.createTransport({
service: 'Yandex',
auth: {
user: process.env.EMAIL,
pass: process.env.PASSWORD
}
});
But it always fails showing the below messege:
{ Error: Message failed: 554 5.7.1 [2] Message rejected under suspicion of SPAM; https://ya.cc/1IrBc 1578999406-wC5neov7vv-ui00GIiO
at SMTPConnection._formatError (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:605:19)
at SMTPConnection._actionSMTPStream (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:1478:34)
at SMTPConnection._responseActions.push.str (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:968:2
2)
at SMTPConnection._processResponse (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:764:20)
at SMTPConnection._onData (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:570:14)
at TLSSocket._socket.on.chunk (F:\ProjectFolder\Office\MXQ\Backend\mxq_server_firebase_functions\functions\node_modules\nodemailer\lib\smtp-connection\index.js:522:47)
at TLSSocket.emit (events.js:198:13)
at TLSSocket.EventEmitter.emit (domain.js:448:20)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at TLSSocket.Readable.push (_stream_readable.js:224:10)
at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'EMESSAGE',
response:
'554 5.7.1 [2] Message rejected under suspicion of SPAM; https://ya.cc/1IrBc 1578999406-wC5neov7vv-ui00GIiO',
responseCode: 554,
command: 'DATA' }
Is it a problem with Yandex or from my side?

I had the same problem as you, but not all mailboxes can't accept emails.
Then, I found the answer in the official support documentation:
https://yandex.com/support/mail/bounces/other/message-rejected-under-suspicion-of-spam.html?lang=en

It is on your side, I had such an error before with another provider (not yendex), and solved it by signing the email, you need to get a DKIM and sign your email with it.

I had the same problem,
After a little bit research I applied method below :
I opened web interface of Yandex Email and manually sent some emails to my own email addresses, and then I've replied this emails back.
Just to prove to the system that this email account sends real letters .. it's not just a robot account.
P.S:
I was sending a welcome email to customers by using Nodemailer and Handlebars for the HTML templates. I'm not sure it's related.

I was getting the same error and I searched for the same and came here, the link posted by #Akira_Ant I clicked and I logged into the yandex service and then the mail from then on started flowing normally, so for me logging into the yandex.mail and then sending such signup mails [in fact all sorts password reset,otp and all in my case] worked. So i guess the solution might be logging in normally and keep logged in and then the service knows that the person is logged in so it may not be spam.

Related

how to debug error from stripe API call? need a node.js stacktrace across event emitter?

I have a node webapp that makes various API calls to Stripe using the stripe npm package. Sometimes I get errors like the one below. Notice that the stacktrace is truncated so that I cannot see which stripe API call causes the error and I also cannot see where in my app this API call is made.
Is there anything I can do to get better error stacktraces?
Error: Missing required param: customer.
at Function.generate (/home/molsson/dv/foobar/node_modules/stripe/lib/Error.js:39:16)
at IncomingMessage.<anonymous> (/home/molsson/dv/foobar/node_modules/stripe/lib/StripeResource.js:175:33)
at Object.onceWrapper (events.js:299:28)
at IncomingMessage.emit (events.js:215:7)
at IncomingMessage.EventEmitter.emit (domain.js:476:20)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Note: the error itself is just an example. I have already fixed it. I just want to get better stacktraces or a better method of debugging these types of errors quickly.
I'm pretty sure my node version has async stacks by default:
$ node --version
v12.12.0
$ node -p process.versions.v8
7.7.299.13-node.12
I tried running with NODE_OPTIONS='--trace-warnings --stack-trace-limit=9999' but it didn't help.
Does it exists some kind of "async stacktraces across event emitters" debugging thing?
I found a good answer to this question myself. The stripe library fires and event before making a new API request, so you can print a stacktrace from there:
stripe.on('request', request => {
const currentStack = (new Error()).stack.replace(/^Error/, '')
console.log(`Making Stripe HTTP request to ${request.path}, callsite: ${currentStack}`)
})
I added a STRIPE_API_TRACING option to my app that I can turn on if I experience errors without stacks. With the tracing on I can just scroll a bit up in the log and see what API calls was dispatched just before the error happened.

Error: Not Found at Gaxios.<anonymous> when trying to get history list from Gmail

I'm trying to process a push notification from Gmail by follow the instruction from this link. I modified some code to read from historyId instead of most recent message like recommended in the guide.
It's normally work find but sometime the problem occurred after received a push notification. The script failed to call Gmail API:
gmail-watch-fs yv1ke4cc0tk8 Error: Not Found
at Gaxios.<anonymous> (/srv/node_modules/gaxios/build/src/gaxios.js:73:27)
at Generator.next (<anonymous>)
at fulfilled (/srv/node_modules/gaxios/build/src/gaxios.js:16:58)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
Here is the line that cause error:
const historyRes = await gmail.users.history.list({
userId: "me",
startHistoryId: historyId,
historyTypes: ["messageAdded"],
})
I found a Japanese site suggest to enable IAM API but it's already enabled in my case. Can anyone help me with this?
The problem is because I try to listen to many subscribed email address by only one Cloud Function instance. It is solved by generate more Cloud Function (one per each subscribed email).

Why am I getting a rate limiting error on post requests?

Whenever I send a post request, I'm getting the following error. I couldn't track down where it is coming from.
SentryError: HTTP Error (429): Creation of this event was denied due to rate limiting
at new SentryError (/home/bwsuser/bws-verwaltung/node_modules/#sentry/core/dist/error.js:9:28)
at ClientRequest.<anonymous> (/home/bwsuser/bws-verwaltung/node_modules/#sentry/node/dist/transports/base.js:46:44)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:543:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
at TLSSocket.socketOnData (_http_client.js:440:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at TLSSocket.Readable.push (_stream_readable.js:208:10)
at TLSWrap.onread (net.js:597:20)
anyone has any idea what might be causing that? or at least where to start looking.
I ran out of ideas here :/
anyone has any idea what might be causing that? or at least where to start looking. I ran out of ideas here :/
Yes, certainly, you need to look here at Quota Management | Sentry Documentation. It mostly happens when you run an app from a local dev server. Here's the summary right from the doc ...
Sentry completes a thorough evaluation of each event to determine if it counts toward your quota, as outlined in this overview. Detailed documentation for each evaluation is linked throughout. Before completing any of these evaluations, Sentry confirms that each event includes a valid DSN and project as well as whether the event can be parsed. In addition, for error events, Sentry validates that the event contains valid fingerprint information. If any of these items are missing or incorrect, the event is rejected.
Another hint, try to disable all your browser extensions and check if that call is gone. I just figure out it is called by a chrome extension for me.
Hope helps

IBM Watson Conversation - Unable to connect node.js to watson conversation

I have a Problem with an IBM Watson Conversation Application.
I have my Application set up and try to connect it to my node.js Application. I’m following this tutorial here:
https://github.com/watson-developer-cloud/node-sdk#conversation
and i am using the official node.js api ibm provides.
Unfortunately it does not work and i get following error.
{ Error: Not Authorized
at Request._callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/lib/requestwrapper.js:87:15)
at Request.self.callback (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/Volumes/hd2/Projekte/vi-com-bot-service/node_modules/watson-developer-cloud/node_modules/request/request.js:1091:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)
code: 401,
error: 'Not Authorized',
description: '2017-06-01T08:57:57-04:00, Error ERCDPLTFRM-DNLKUPERR occurred when accessing https://gateway.watsonplatform.net/conversation/api/v1/workspaces/dc8097e8-fea7-47a3-80ed-57c43321377e/message?version=2017-04-21, Tran-Id: gateway-dp01-2475007148 - Invalid UserId and/or Password. Please confirm that your credentials match the end-point you are trying to access. A common error is trying to use credentials from an experimental or beta release against a GA release or vice versa' }
The Credentials i provide are correct.
Do you have ay idea, why i does not work?
Best, ben
Bluemix has a number of regions where you can host services. There are different gateways into each region. By default it is https://gateway.watsonplatform.net.
For Germany + France Regions you would set the following URL variable in the code:
url: 'https://gateway-fra.watsonplatform.net/conversation/api/'
Like so:
var conversation = new ConversationV1({
username: '<username>',
password: '<password>',
url: 'https://gateway-fra.watsonplatform.net/conversation/api/',
version_date: ConversationV1.VERSION_DATE_2017_05_26
});
For other regions, you can go into the Watson conversation service credentials to see the URL. Or the conversation workspace "Deploy" then "Credentials" section.
This is the link to the revised IBM Cloud API for Watson Assistant including code samples for node.js and a list of URLs (see 'Service Endpoint').
var ConversationV1= require('watson-developer-cloud/conversation/v1');
var conversation = new ConversationV1({
username:'<username>',
password: '<Password>',
version_date: 'Date'
});
conversation.message({
workspace_id:'<Workspace Id>',
context: userContext,
input: {
"text": "<text>"
}
},function(err,resp){
});

Yahoo OpenID returning invalid signature with passport-yahoo

As of today, Dec 10th, 2013, it seems that passport-yahoo is unable to correctly complete the openid workflow. We are getting an invalid signature. My knowledge of openid is quite limited, and I am still looking into the issue. Can anyone provide some insight into this problem? Is anyone else running in to the same problem?
Here is the stack trace from node:
{
"message":"Failed to verify assertion",
"stack":"Failed to verify assertion (message: Invalid signature)
at app/node_modules/passport-yahoo/node_modules/passport-openid/lib/passport-openid/strategy.js:184:36
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1063:12
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1188:14
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1269:7
at Object.openid.loadAssociation (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:107:5)
at _checkSignatureUsingAssociation (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1231:10)
at _checkSignature (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1221:5)
at _verifyAssertionAgainstProvider (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1184:3)
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:1155:16
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:678:7
at app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:533:11
at done (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:254:9)
at IncomingMessage.<anonymous> (app/node_modules/passport-yahoo/node_modules/passport-openid/node_modules/openid/openid.js:258:32)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)",
"name":"InternalOpenIDError",
"openidError":{"message":"Invalid signature"}
}
Yes - we started having intermittent issues starting this past Friday, then complete failure today. From Y! developer forums, it seems others are having the same problem - http://developer.yahoo.com/forum/OpenID-General-Discussion/OpenID-login-with-Yahoo-broke-today/1386713784256-49fd81b6-7752-4c9f-8b7c-728235c46bae
And in general testing a number of OpenID sites, Yahoo login doesn't work

Resources