Sending email : "Error can not use ipv4 addresses with current network"

Just to add that I've just experienced this too yesterday.

I have 2 subnets and a rpi with node-red on each (both nr 3.0.2 and nodejs 16.17.1) one of my rPis was giving me this error, and the other not. Both could reach the internet. For me switching to the IP address of smtp.gmail.com fixed it.

I went digging and found the code that triggers the error message here
nodemailer/index.js at master · nodemailer/nodemailer · GitHub @ line 219

I looked at the changelog for this file and tried to see if undoing some of the changes resolved the issue but I was unsuccessful.

The error is raised in a closed issue, though just 22 days ago with someone else experiencing it

And an earlier closed issue about accessing local interfaces which was added to the code

I've not managed to get to the bottom of this, but today when I've begun to look at it again - it is all working just fine on both machines again. I'm just wondering if somewhere there was some bad dns data that has expired and been refreshed, or perhaps my pihole interfered (recently updated) but I've not found any logs showing anything was blocked ---hmm.

Since this fails relatively silently I've got 2 nodes for an important email alert flow, one with the IP and one smtp.gmail.com just in case

2 Likes