In message <10fhnjv$1gvnc$5@dont-email.me>my system is tailored to my needs. It works perfectly. I just need to
The Natural Philosopher <tnp@invalid.invalid> wrote:
As part of my enhancements to the home controller, I want to send email
warnings of low heating oil level.
Have a look at Pushover to see if it would be an alternative way to
meet your needs. I use it to alert myself of problems in my heating
system.
David
The Natural Philosopher <tnp@invalid.invalid> wrote:
Seriously,m its not the server, its the DNS.
It (the PI) cant even *find* the SMTP server
Nov 18 10:46:56 heating-controller postfix/pickup[8654]: CC05B1F270:
uid=0 from=<oil-monitor@heating-controller>
Nov 18 10:46:56 heating-controller postfix/cleanup[10455]: CC05B1F270:
message-id=<20251118104656.CC05B1F270@heating-controller>
Nov 18 10:46:56 heating-controller postfix/qmgr[1295]: CC05B1F270:
from=<oil-monitor@heating-controller>, size=387, nrcpt=1 (queue active)
Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270:
to=<superroot@templar.co.uk>, relay=none, delay=0.38,
delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain name
not found. Name service error for name=vps.templar.co.uk type=MX: Host
not found, try again)
If it's the only network activity the thing does regularly, maybe
the WiFi interface has gone into some sort of sleep mode and the DNS
resolver isn't waiting for it to wake up. If you leave ping running
(eg. "nohup ping -s 1 vps.templar.co.uk &") to keep the interface
active, maybe it will work the first time?
Or if it doesn't change, you could set the IP address for
vps.templar.co.uk in /etc/hosts.
Seriously,m its not the server, its the DNS.
It (the PI) cant even *find* the SMTP server
Nov 18 10:46:56 heating-controller postfix/pickup[8654]: CC05B1F270:
uid=0 from=<oil-monitor@heating-controller>
Nov 18 10:46:56 heating-controller postfix/cleanup[10455]: CC05B1F270: message-id=<20251118104656.CC05B1F270@heating-controller>
Nov 18 10:46:56 heating-controller postfix/qmgr[1295]: CC05B1F270: from=<oil-monitor@heating-controller>, size=387, nrcpt=1 (queue active)
Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270: to=<superroot@templar.co.uk>, relay=none, delay=0.38, delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain name
not found. Name service error for name=vps.templar.co.uk type=MX: Host
not found, try again)
As part of my enhancements to the home controller, I want to send email warnings of low heating oil level.
As part of my enhancements to the home controller, I want to send email warnings of low heating oil level.
So I removed exim which was too much like hard work, installed PostFix
and all is well...,except it isn't.
If I send a mail out of the blue after a a few hours delay, the mail immediately *always* gets stuck in the queue with a message about being unable to determine the IP address of the SMTP relay.
If I send another message everything Just Works, and indeed the h mail
queue gets flushed eventually as well with a successful delivery.
The Natural Philosopher <tnp@invalid.invalid> wrote:
As part of my enhancements to the home controller, I want to send email
warnings of low heating oil level.
So I removed exim which was too much like hard work, installed PostFix
and all is well...,except it isn't.
If I send a mail out of the blue after a a few hours delay, the mail
immediately *always* gets stuck in the queue with a message about being
unable to determine the IP address of the SMTP relay.
If I send another message everything Just Works, and indeed the h mail
queue gets flushed eventually as well with a successful delivery.
'Greylisting'? SMTP servers often delay mail from unrecognised senders as a spam block - spammers tend not come back when told to try again later.
Also the message needs to be correct to match SFP/DKIM/DMARC rules,
otherwise it may get delayed or discarded. It may also be delayed/discarded due to sending from a 'consumer' IP.
Perhaps by the time the second message arrives the spamfilter has decided you're ok and to let the message straight through.
I would not be doing direct SMTP in this day and age - send using an SMTP account (with username/password) at the company who runs the SMTP server for the sender's mail domain.
If the SMTP relay is indeed your domain's mail server, perhaps the first
time DNS lookup is too slow?
Theo
Seriously,m its not the server, its the DNS.
Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270: to=<superroot@templar.co.uk>, relay=none, delay=0.38, delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain
name not found. Name service error for name=vps.templar.co.uk
type=MX: Host not found, try again)
As part of my enhancements to the home controller, I want to send email warnings of low heating oil level.
The Natural Philosopher wrote:
Indicating a 5 minute delay between being queued and being sent...
grep 300 /etc/postfix/main.cf
maybe tweak smtpd_timeout=nn if that matches
The Natural Philosopher <tnp@invalid.invalid> writes:
On 18/11/2025 21:08, Computer Nerd Kev wrote:
The Natural Philosopher <tnp@invalid.invalid> wrote:
Seriously,m its not the server, its the DNS.
I was logged in over ssh at the time, so that hound don't hunt :-(It (the PI) cant even *find* the SMTP server
Nov 18 10:46:56 heating-controller postfix/pickup[8654]: CC05B1F270:
uid=0 from=<oil-monitor@heating-controller>
Nov 18 10:46:56 heating-controller postfix/cleanup[10455]: CC05B1F270: >>>> message-id=<20251118104656.CC05B1F270@heating-controller>
Nov 18 10:46:56 heating-controller postfix/qmgr[1295]: CC05B1F270:
from=<oil-monitor@heating-controller>, size=387, nrcpt=1 (queue active) >>>> Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270:
to=<superroot@templar.co.uk>, relay=none, delay=0.38,
delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain name >>>> not found. Name service error for name=vps.templar.co.uk type=MX: Host >>>> not found, try again)
If it's the only network activity the thing does regularly, maybe
the WiFi interface has gone into some sort of sleep mode and the DNS
resolver isn't waiting for it to wake up. If you leave ping running
(eg. "nohup ping -s 1 vps.templar.co.uk &") to keep the interface
active, maybe it will work the first time?
Was the SSH session actually doing anything? An idle SSH session doesn?t
have to exchange any packets at all.
But ?it?s always DNS? is a pretty reliable starting point for network debugging, and I think it?s the right one here.
What are you using as a name server? i.e. what is in resolv.conf on this machine?
Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270: to=<superroot@templar.co.uk>, relay=none, delay=0.38, delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain
name not found. Name service error for name=vps.templar.co.uk type=MX:
Host not found, try again)
^^^^^^^^^^^^^^^^^^^^^^^^^
It?s a temporary failure, ?TRY_AGAIN? ultimately from something in
resolv.h or netdb.h, but with a lot of Postfix-specific DNS code around
it.
vps.templar.co.uk. 3600 IN MX 5 vps.templar.co.uk.
Your MX record has 1-hour TTL, so an hour after the last successful
query, your local (or ISP-provided) name server will have to ask domaincontrol.com again. That may explain why ?a few hours delay? brings
the condition back.
domaincontrol.com seems to be pretty fast from here but if for whatever reason the network between you and domaincontrol is slow or unreliable,
or the name server you?re using is underprovisioned, then that could
explain the temporary failures here. By the time you send the another
message everything has caught up, explaining why it works on the second attempt.
from=<oil-monitor@heating-controller>
On 18.11.2025 15:27 Uhr The Natural Philosopher wrote:
from=<oil-monitor@heating-controller>
That is your first problem. Us a real existing address for that.
Do you want to run you own mail domain or do you just want to use a
freemail account for sending that out?
On 18/11/2025 12:08, The Natural Philosopher wrote:
As part of my enhancements to the home controller, I want to send email warnings of low heating oil level.
This sounds rather like something I have been planning to do. AAMOI how
are you measuring the oil level?
Daniel James <daniel@me.invalid> wrote:
On 18/11/2025 12:08, The Natural Philosopher wrote:
As part of my enhancements to the home controller, I want to send email
warnings of low heating oil level.
This sounds rather like something I have been planning to do. AAMOI how
are you measuring the oil level?
FWIW I had one of those Watchman ultrasonic oil tank sensors and I could
pick up the reading via rtl_433 and a cheap RTL2832-based DVB TV dongle.
(as well as the tyres on the car, and various other gizmos locally).
Perhaps a wires-free option if you already have such a sensor?
Theo
On 18/11/2025 21:08, Computer Nerd Kev wrote:
The Natural Philosopher <tnp@invalid.invalid> wrote:
Seriously,m its not the server, its the DNS.
I was logged in over ssh at the time, so that hound don't hunt :-(It (the PI) cant even *find* the SMTP server
Nov 18 10:46:56 heating-controller postfix/pickup[8654]: CC05B1F270:
uid=0 from=<oil-monitor@heating-controller>
Nov 18 10:46:56 heating-controller postfix/cleanup[10455]: CC05B1F270:
message-id=<20251118104656.CC05B1F270@heating-controller>
Nov 18 10:46:56 heating-controller postfix/qmgr[1295]: CC05B1F270:
from=<oil-monitor@heating-controller>, size=387, nrcpt=1 (queue active)
Nov 18 10:46:57 heating-controller postfix/smtp[10457]: CC05B1F270:
to=<superroot@templar.co.uk>, relay=none, delay=0.38,
delays=0.19/0.14/0.04/0, dsn=4.4.3, status=deferred (Host or domain name >>> not found. Name service error for name=vps.templar.co.uk type=MX: Host
not found, try again)
If it's the only network activity the thing does regularly, maybe
the WiFi interface has gone into some sort of sleep mode and the DNS
resolver isn't waiting for it to wake up. If you leave ping running
(eg. "nohup ping -s 1 vps.templar.co.uk &") to keep the interface
active, maybe it will work the first time?
On 19/11/2025 11:13, Mike Scott wrote:
On 19/11/2025 10:33, The Natural Philosopher wrote:essentially the same result, but thanks˙ anyway...
# dig vps.templar.co.uk
dig -t any .......
dig -t any vps.templar.co.uk
dig -t any @8.8.8.8 vps.templar.co.uk
# dig vps.templar.co.uk
On 18.11.2025 15:27 Uhr The Natural Philosopher wrote:
from=<oil-monitor@heating-controller>
That is your first problem. Us a real existing address for that.
On 19/11/2025 10:33, The Natural Philosopher wrote:
# dig vps.templar.co.uk
dig -t any .......
The Natural Philosopher <tnp@invalid.invalid> writes:
So no, I don't know what it is now using as a DNS client.
Its very odd. I just did this...
# dig vps.templar.co.uk
; <<>> DiG 9.16.50-Raspbian <<>> vps.templar.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24512
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 7f7ca1b95493f5c601000000691d9a18750f0123b174788b (good)
;; QUESTION SECTION:
;vps.templar.co.uk. IN A
;; ANSWER SECTION:
vps.templar.co.uk. 3726 IN A 185.113.128.151
;; Query time: 9 msec
;; SERVER: 192.168.0.101#53(192.168.0.101)
;; WHEN: Wed Nov 19 10:21:12 GMT 2025
;; MSG SIZE rcvd: 90
...then this...
root@heating-controller:/var/ramlog# echo "This is more bollox isn't
it?" | mail -a "From: oil-monitor@heating-controller" -s "another
message" superroot@templar.co.uk
...and this...
root@heating-controller:/var/ramlog# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C459D1FE2E 387 Wed Nov 19 10:21:48 oil-monitor@heating-controller
(Host or domain name not found. Name service error for
name=vps.templar.co.uk type=MX: Host not found, try again)
superroot@templar.co.uk
-- 0 Kbytes in 1 Request.
Now unless dig is using some other means than postfix to look up DNS,
it looks like the problem is in postfix somehow.
Maybe, but the above doesn?t prove it; you?ve asked for an A record but Postfix asks for an MX record, so your lookup won?t have populated the
cache (if there is one). (It?ll look for the A record next, but until
it?s got the MX record it doesn?t know what A record to ask for.)
If there is doubt about what name server is being used you could use
tcpdump to find out.
sudo tcpdump -np -i br0 udp port 53
Replace br0 with your own network interface. You?ll need to check at
least loopback (lo) and any real network interfaces.
On 19/11/2025 07:56, Marco Moock wrote:
On 18.11.2025 15:27 Uhr The Natural Philosopher wrote:
from=<oil-monitor@heating-controller>
That is your first problem. Us a real existing address for that.No. I wont. Because it is effectively private intra domain email.
So no, I don't know what it is now using as a DNS client.
Its very odd. I just did this...
# dig vps.templar.co.uk
; <<>> DiG 9.16.50-Raspbian <<>> vps.templar.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24512
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 7f7ca1b95493f5c601000000691d9a18750f0123b174788b (good)
;; QUESTION SECTION:
;vps.templar.co.uk. IN A
;; ANSWER SECTION:
vps.templar.co.uk. 3726 IN A 185.113.128.151
;; Query time: 9 msec
;; SERVER: 192.168.0.101#53(192.168.0.101)
;; WHEN: Wed Nov 19 10:21:12 GMT 2025
;; MSG SIZE rcvd: 90
...then this...
root@heating-controller:/var/ramlog# echo "This is more bollox isn't
it?" | mail -a "From: oil-monitor@heating-controller" -s "another
message" superroot@templar.co.uk
...and this...
root@heating-controller:/var/ramlog# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C459D1FE2E 387 Wed Nov 19 10:21:48 oil-monitor@heating-controller
(Host or domain name not found. Name service error for
name=vps.templar.co.uk type=MX: Host not found, try again)
superroot@templar.co.uk
-- 0 Kbytes in 1 Request.
Now unless dig is using some other means than postfix to look up DNS,
it looks like the problem is in postfix somehow.
On 19/11/2025 12:18, The Natural Philosopher wrote:
On 19/11/2025 11:13, Mike Scott wrote:
essentially the same result, but thanks˙ anyway...
On 19/11/2025 10:33, The Natural Philosopher wrote:
# dig vps.templar.co.uk
dig -t any .......
Hmm, interesting, the result depends, it seems, on the dns server:
[/etc/resolv.conf] was set to 127.0.0.1 and IIRC dnsmasq was
running. I set it to my internal servers that run BIND but I dont
think its actually using them
So no, I don't know what it is now using as a DNS client.
Now unless dig is using some other means than postfix to look up
DNS, it looks like the problem is in postfix somehow.
On 19.11.2025 10:11 Uhr The Natural Philosopher wrote:
On 19/11/2025 07:56, Marco Moock wrote:
On 18.11.2025 15:27 Uhr The Natural Philosopher wrote:
from=<oil-monitor@heating-controller>
That is your first problem. Us a real existing address for that.
No. I wont. Because it is effectively private intra domain email.
Then make sure your postfix doesn't check that. It seems for me it does.
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 14 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 19:03:48 |
| Calls: | 184 |
| Files: | 21,502 |
| Messages: | 79,488 |