The message could not be sent because connecting to Outgoing server (SMTP) failed

The pihole has been running very successfully for over year. Then last week it stopped sending emails from BetterBird. I can send emails from my phone via my system and my emails will go when I turn off the Pihole. I updated all the software (both the Pihole software via pihole -up) and the OS software. It made no difference. The error message is as follows and no mails are sent:

Sending of the message failed.
The message could not be sent because connecting to Outgoing server (SMTP) failed. The server may be unavailable or is refusing SMTP connections. Please verify that your Outgoing server (SMTP) settings are correct and try again

Expected Behaviour:

That emails would be sent as before and as can be sent when pihole is turned off

  • Operating System (Family and Version)
    VERSION='11 (bullseye)'
  • Hardware
  • RPi3 Model B Plus Rev 1.3

Actual Behaviour:

Sending of message failed...as above

Debug Token:

https://tricorder.pi-hole.net/dc0iYj8m

This looks like your smtp server is blacklisted. Check your blacklist(s), whitelist the smtp-domain and try again.

3 Likes

Can you explain how you have your email process set up?

The only error/warning I see in the debug log is:

*** [ DIAGNOSING ]: Pi-hole diagnosis messages
   count   last timestamp       type                  message                                                       blob1                 blob2                 blob3                 blob4                 blob5               
   ------  -------------------  --------------------  ------------------------------------------------------------  --------------------  --------------------  --------------------  --------------------  --------------------
   1       2025-04-16 18:56:13  DNSMASQ_WARN          ignoring query from non-local network 10.1.1.128 (logged onl                                                                                                              
                                                      y once)    

Where are you seeing the SMTP failure notice?

1 Like

There is no reason that it would have been blacklisted...as I am the only one with access. However, I had already thought of that a few days ago and white listed it....and it made no difference. This morning when I turned on my PC....It would not even download any emails....normally it will just not send them. When I turned off pi-hole, all the emails came down and I could send emails also!

In the standard BetterBird/Thunderbird way...that worked very well for years until a few days ago.

The SMTP failure notice appears on BetterBird.

This morning when I turned on my PC....It would not even download any emails....normally it will just not send them. When I turned off pi-hole, all the emails came down and I could send emails also!

Can you query Pi-hole via the admin interface and use the domain name of the SMTP server to confirm it is or is not being blocked?

1 Like

OK, I checked and it was not on the domain list. I have now added it to the whitelist...so lets see if that works.

What operating system is on the client with the SMTP issues?

Can you can run a dig or nslookup from the client to check and see if DNS is the culprit?

1 Like

Linux Mint.

:~$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34522
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz.		IN	A

;; ANSWER SECTION:
1stdomains.co.nz.	300	IN	A	104.18.18.8
1stdomains.co.nz.	300	IN	A	104.18.19.8

;; Query time: 180 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 10:10:14 NZST 2025
;; MSG SIZE  rcvd: 77

It seems to be intermittent....when I turn off the pi-hole and then turn it back on, the mail delivery works for a time....and then fails again.

Are you running Pi-hole on the same machine you are running BetterBird?

Please post up that same dig output when you are getting the SMTP failure.

No, I am running it on a RPI3 which is attached to the same LAN.

Do I run the dig on my PC or set up a screen etc for the RPi3 and run the dig on that?

The dig output you provided has a DNS server address of 127.0.0.1:53 which means it is using itself for DNS.

Run the dig on the system that the email client is running on. We are trying to see if there is an issue with DNS on the system with the email client that is getting the SMTP errors.

1 Like

This is the dig while it is trying to send the email:

$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54882
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz. IN A

;; ANSWER SECTION:
1stdomains.co.nz. 89 IN A 104.18.18.8
1stdomains.co.nz. 89 IN A 104.18.19.8

;; Query time: 86 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 11:48:11 NZST 2025
;; MSG SIZE rcvd: 77

and this is the dig after it has been unable to send the email and has sent me the message (Sending of the message failed.
The message could not be sent because connecting to Outgoing server (SMTP) failed. The server may be unavailable or is refusing SMTP connections. Please verify that your Outgoing server (SMTP) settings are correct and try again.

oops, sorry hit the reply button by mistake.

This is the dig after receiving the cannot send message (both from the PC):
$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54882
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz. IN A

;; ANSWER SECTION:
1stdomains.co.nz. 89 IN A 104.18.18.8
1stdomains.co.nz. 89 IN A 104.18.19.8

;; Query time: 86 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 11:48:11 NZST 2025
;; MSG SIZE rcvd: 77

Sorry ignore all that...I posted the same dig twice....

:~$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54882
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz. IN A

;; ANSWER SECTION:
1stdomains.co.nz. 89 IN A 104.18.18.8
1stdomains.co.nz. 89 IN A 104.18.19.8

;; Query time: 86 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 11:48:11 NZST 2025
;; MSG SIZE rcvd: 77

:~$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22661
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz. IN A

;; ANSWER SECTION:
1stdomains.co.nz. 0 IN A 104.18.18.8
1stdomains.co.nz. 0 IN A 104.18.19.8

;; Query time: 3 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 11:50:56 NZST 2025
;; MSG SIZE rcvd: 77

The time stamp tells which was the one while trying to send the mail and then later when it gave me the message.

Okay, you'll need to break it all down for me because I'm not seeing any issues.

:~$ dig 1stdomains.co.nz

; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> 1stdomains.co.nz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54882
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;1stdomains.co.nz. IN A

;; ANSWER SECTION:
1stdomains.co.nz. 89 IN A 104.18.18.8
1stdomains.co.nz. 89 IN A 104.18.19.8

;; Query time: 86 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Thu Apr 17 11:48:11 NZST 2025
;; MSG SIZE rcvd: 77

That shows that the DNS server at 127.0.0.53 is able to resolve the domain to its IP address. That eliminates DNS from the list of potential problems. I can't tell if the DNS server at 127.0.0.53 is Pi-hole or not but from experience with Mint it appears to be the networkmanager's DNS server. I would expect to see 10.1.1.3 as the IP address of the DNS server, that is the IP address shown for Pi-hole in the debug log.

The problem may be that Mint is just not using Pi-hole for DNS so any changes (blocking or allowing) on Pi-hole will not affect Mint.

On the Mint box, which I am assuming is the box that is running the email client and the box that is having the problems with SMTP, what is the contents of the /etc/resolv.conf file?

1 Like