Running sudo sendmail -v -q doesn't have any effect.
Stopping and restarting the postfix daemon is equally ineffective.
If not, I guess I have to re-examine my configuration.
If so, have you discovered any way to make postfix run the mail in the queue?
I use postfix to send outgoing email. (My MUA is mutt, just in case that
is somehow relevant.)
Every now and then I make the mistake of sending (i.e., trying to send)
email when I'm off-line.
This is a mistake, because if postfix doesn't get
the email out on first try, it seems to give up on it entirely.
Running sudo sendmail -v -q doesn't have any effect.
Stopping and restarting the postfix daemon is equally ineffective.
My question: does anyone else (who uses postfix) see this behaviour?
If not, I guess I have to re-examine my configuration.
If so, have you discovered any way to make postfix run the mail inthe queue?
My question: does anyone else (who uses postfix) see this behaviour?
If not, I guess I have to re-examine my configuration.
If so, have you discovered any way to make postfix run the mail inthe queue?
I never had these issues when I used sendmail. (But I switched to postfix when "everyone" told me it was nicer and newer and shinier than sendmail,That was your mistake. Sendmail is GOAT. It's still being actively
and that sendmail was a horrible security hazard, and ...)
Jim <zsd@jdvb.ca> writes:
I never had these issues when I used sendmail. (But I switched to
century. It's been tried and proven and can route mail no others can
(UUCP, mail11).
oh so sendmail ... runs with NFS now too?
What would be the problem with sendmail and NFS? As long as I can
remember, sendmail has worked fine with /var/spool/mail mounted by
NFS. This means that mail sent to user1@host1 can also be read by
user1 from host2 if host1 and host2 mount the same NFS export as
their /var/spool/ mail.
On Thu, 18 Dec 2025 14:11:30 +1000, noel wrote:
oh so sendmail ... runs with NFS now too?
What would be the problem with sendmail and NFS? As long as I can
remember, sendmail has worked fine with /var/spool/mail mounted by NFS.
This means that mail sent to user1@host1 can also be read by user1 from
host2 if host1 and host2 mount the same NFS export as their /var/spool/
mail.
regards Henrik
I use postfix to send outgoing email. (My MUA is mutt, just in case
that is somehow relevant.)
Every now and then I make the mistake of sending (i.e., trying to send)
email when I'm off-line. This is a mistake, because if postfix doesn't
get the email out on first try, it seems to give up on it entirely.
On 18.12.2025 06:32 Henrik Carlqvist wrote:
What would be the problem with sendmail and NFS?
Does the locking work properly in that case?
Jim <zsd@jdvb.ca> wrote:
I use postfix to send outgoing email. (My MUA is mutt, just in case that
is somehow relevant.)
Every now and then I make the mistake of sending (i.e., trying to send)
email when I'm off-line.
Email existed during the time before 24/7 connectivity, it (the SMTP protocol) already handles both senders and receivers not being
network accessible 100% of the time.
This is a mistake, because if postfix doesn't get
the email out on first try, it seems to give up on it entirely.
The server is supposed to retry a small number of times over a period
of time. I don't remember the exact values, but there are probably
postfix configuration words to adjust away from the defaults.
Running sudo sendmail -v -q doesn't have any effect.
That is odd. Note, you didn't say, but, are you running the -q when
you are online? Running that will have no effect if you are offline.
Stopping and restarting the postfix daemon is equally ineffective.
Again, are you doing so when you are online?
My question: does anyone else (who uses postfix) see this behaviour?
If not, I guess I have to re-examine my configuration.
No, but I say that from the perspective of last having postfix handle
email while offline years ago. But even back then, it handled it as expected. If offline the emails queued. When online, a sendmail -q
would flush the waiting queue out to the internet.
If so, have you discovered any way to make postfix run the mail inthe queue?
sendmail -q is the way -- but you do have to be online, and while
you've implied that you are running it while online, you never
explicitly said so.
On Tue, 16 Dec 2025 15:20:45 -0400, Jim wrote:
My question: does anyone else (who uses postfix) see this behaviour?
If not, I guess I have to re-examine my configuration.
postconf maximal_queue_lifetime
what does it say? The default is 5 days
If so, have you discovered any way to make postfix run the mail inthe queue?
mailq - what does it say?
if it reports queued messages, run: sendmail -q
if it shows nothing, show us output of: postconf -n
Jim <zsd@jdvb.ca> writes:
I never had these issues when I used sendmail. (But I switched to postfix >> when "everyone" told me it was nicer and newer and shinier than sendmail,
and that sendmail was a horrible security hazard, and ...)
That was your mistake. Sendmail is GOAT.
It's still being actively developed. The security issues were likely from decades ago or even last century. It's been tried and proven and can
route mail no others can (UUCP, mail11).
On Tue, 16 Dec 2025 15:20:45 -0400, Jim wrote:
I use postfix to send outgoing email. (My MUA is mutt, just in case
that is somehow relevant.)
Every now and then I make the mistake of sending (i.e., trying to send)
email when I'm off-line. This is a mistake, because if postfix doesn't
get the email out on first try, it seems to give up on it entirely.
[snip]
I use a small Python script called "dupe" for sending email from the
command line.
It connects directly to the SMTP server and sends the message immediately rCo no local queue or postfix daemon involved.
If you're interested, it's part of the SAM.handy library:
https://rosevearsoftware.com/products/sam/libraries/handy/index.php
Current version is SAM.handy-1.tar.gz.
Just something I wrote for my own use and share in case it's useful to others.
Joseph
mailq - what does it say?
It tells me there are mail message(s) waiting to be sent.
And unfortunately, sendmail -q (I use -v as well) while the network is
up has no effect, the mail is not sent, and mailq continues to report
that there is mail waiting to be sent.
Oh yeah, and I've heard that if you run sendmail your dog will
bite you and run away with the postman, your hair will fall out,
your investments will all tank, ... :-)
And yet Pat V dispatched sendmail to the wasteland of extra/. :-)
... But (as I recall) I was running into some issues with my
outgoing mail servers no longer accepting mail that didn't have a
"From:" address in their domain, and (almost) all of them wanting authentication, and needing to configure things so that sendmail or
postfix or ... would attempt the correct form of authentication with
the right credentials depending on the email's "From:" address. ...
On Mon, 22 Dec 2025 17:34:40 -0400, Jim Diamond wrote:
mailq - what does it say?
It tells me there are mail message(s) waiting to be sent.
And unfortunately, sendmail -q (I use -v as well) while the network is
up has no effect, the mail is not sent, and mailq continues to report
that there is mail waiting to be sent.
OK first, what is the reason? tail -n20 maillog (if you run it
through amavis or mailscanner use -n60)
(you can sanitise your server name, and any email addresses - so long as
you are sure there is no typo in the emails - I suggest replace left hand side with xxxxxxxxxxxxx and leave the host/domain part intact)
This might allow identifying the reason, else the next command will haver
to be run again and again and again, when you should never have to.
THEN
postqueue -f
Jim, I would expect that you should be able to find some insight as to
why Postfix is failing to send queued messages in your maillog. As it
is, I suspect that folks could only otherwise guess at what the cause is without seeing some log extracts anyway.
Here is the message in maillog when it tried to send an email while the network was down:
------------------
Dec 16 15:05:58 x360 postfix/pickup[1480]: AA6B21E0B4C: uid=1000 from=<MY_ADDR>
Dec 16 15:05:58 x360 postfix/cleanup[2477]: AA6B21E0B4C: message-id=<aUGtlsa5qHdUlcC7@x360.localdomain>
Dec 16 15:05:58 x360 postfix/qmgr[3285]: AA6B21E0B4C: from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=0.05,
delays=0.03/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name
not found. Name service error for name=MY_SMTP_SERVER type=A: Host
not found, try again)
------------------
Jim Diamond <zsd@jdvb.ca> wrote:
Here is the message in maillog when it tried to send an email while the
network was down:
------------------
Dec 16 15:05:58 x360 postfix/pickup[1480]: AA6B21E0B4C: uid=1000 from=<MY_ADDR>
Dec 16 15:05:58 x360 postfix/cleanup[2477]: AA6B21E0B4C: message-id=<aUGtlsa5qHdUlcC7@x360.localdomain>
Dec 16 15:05:58 x360 postfix/qmgr[3285]: AA6B21E0B4C: from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=0.05,
delays=0.03/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name
not found. Name service error for name=MY_SMTP_SERVER type=A: Host
not found, try again)
------------------
Grep your postfix config files for the string "MY_SMTP_SERVER". It
looks like you may have enabled an option somewhere, but did not change
the text you were supposed to change to be the domain name of the
actual server.
That is, unless your servers DNS name is actually "MY_SMTP_SEVER" (not likely).
Here is the message in maillog when it tried to send an email while the network was down:
------------------
...
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=0.05, delays=0.03/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
Once the network was back, I tried running the queue:
------------------
...
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
But this is ...
Here's a thought ... It won't help solve the problem but it might
help identify the cause ...
Perhaps just before and just after running "sendmail -v -q" try running "getent hosts MY_SMTP_SERVER" (with the correct hostname, of course)
and confirm that the system is generally able to resolve the hostname?
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16
15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2
IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C: from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service
error for name=MY_SMTP_SERVER type=A: Host not found, try again) ------------------
I don't know if the above bits from maillog tell you anything, aside
from seeing that it was continuing to insist that it couldn't look up my
SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
On 2025-12-25, Jim Diamond wrote:
Here is the message in maillog when it tried to send an email while the
network was down:
------------------
...
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=0.05, delays=0.03/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
Ok, that's not surprising ...
Once the network was back, I tried running the queue:
------------------
...
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
But this is ...
Here's a thought ... It won't help solve the problem but it might
help identify the cause ...
Perhaps just before and just after running "sendmail -v -q" try running "getent hosts MY_SMTP_SERVER" (with the correct hostname, of course)
and confirm that the system is generally able to resolve the hostname?
Based on the timestamps from your log extracts above, I'm guessing
(and yes, only guessing) that the attempt to flush the mail queue
is happening before the resolver is able to fulfill its role.
My suggestion here might help confirm or disprove that. I hope that
it helps.
Sylvain Robitaille writes:
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0, dsn=4.4.3,
status=deferred (Host or domain name not found. Name service error for
name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
But this is ...
Here's a thought ... It won't help solve the problem but it might
help identify the cause ...
Perhaps just before and just after running "sendmail -v -q" try running
"getent hosts MY_SMTP_SERVER" (with the correct hostname, of course)
and confirm that the system is generally able to resolve the hostname?
Postfix is unlikely to be using glibc to resolve hostnames, but rather it's making direct DNS queries, either by doing it itself or using a resolver library. The "type=A" part of the syslog message is a honking clue.
In which case, it would be more accurate to reproduce what postfix is doing by running dig:
dig MY_SMTP_SERVER a
On Wed, 24 Dec 2025 20:12:49 -0400, Jim Diamond wrote:
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16
15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2
IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C:
from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service
error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
I don't know if the above bits from maillog tell you anything, aside
from seeing that it was continuing to insist that it couldn't look up my
SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
Jim,
This tells me everything, the DNS failures carry through!
run exactly this: postsuper -r ALL
This *should* do fresh DNS requests and send every message in your queue
if you are online
On 2025-12-25 at 22:13 AST, noel <deletethis@invalid.lan> wrote:
On Wed, 24 Dec 2025 20:12:49 -0400, Jim Diamond wrote:
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16
15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2
IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C:
from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service
error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
I don't know if the above bits from maillog tell you anything, aside
from seeing that it was continuing to insist that it couldn't look up my >>> SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
Jim,
This tells me everything, the DNS failures carry through!
run exactly this: postsuper -r ALL
This *should* do fresh DNS requests and send every message in your queue
if you are online
Noel,
thanks for the suggestion, I was unfamiliar with that command. I will give it a try next time I have this issue.
When you say "the DNS failures carry through!", are saying that postfix, rather than trying a new DNS lookup for an email in the queue, doesn't
bother trying again and doubles down on its "DNS failure" thought?
If so, does that sound like a bug to you? It sounds like a bug to me, but maybe there is some other issue in play which causes that behaviour to be what is desired.
Sam, thanks for the thoughts. As I mentioned in another reply (well after your posting) when the same problem happened another time, I successfully sent out many emails while the stuck one remained in the queue, which tells me that postfix was able to find my mail server for new email.
Jim <zsd@jdvb.ca> wrote:
On 2025-12-25 at 22:13 AST, noel <deletethis@invalid.lan> wrote:
On Wed, 24 Dec 2025 20:12:49 -0400, Jim Diamond wrote:
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16
15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2
IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C:
from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service >>>> error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
I don't know if the above bits from maillog tell you anything, aside
from seeing that it was continuing to insist that it couldn't look up my >>>> SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
Jim,
This tells me everything, the DNS failures carry through!
run exactly this: postsuper -r ALL
This *should* do fresh DNS requests and send every message in your queue >>> if you are online
Noel,
thanks for the suggestion, I was unfamiliar with that command. I will give >> it a try next time I have this issue.
When you say "the DNS failures carry through!", are saying that postfix,
rather than trying a new DNS lookup for an email in the queue, doesn't
bother trying again and doubles down on its "DNS failure" thought?
If so, does that sound like a bug to you? It sounds like a bug to me, but >> maybe there is some other issue in play which causes that behaviour to be
what is desired.
What is the setting for "address_verify_negative_cache" in your postfix configuration?
Also, you may want to take a look at the "dialup configuration"
settings in the Postfix docs:
https://www.postfix.org/STANDARD_CONFIGURATION_README.html#dialup
While I don't recall you indicating 'why' you have intermittent network connectivity,
a system using "dialup" is also a system with 'intermittent network connectivity'. So some settings for dialup may be appropriate for your usecase as well.
On 2025-12-28 at 01:19 AST, Rich <rich@example.invalid> wrote:
Jim <zsd@jdvb.ca> wrote:
On 2025-12-25 at 22:13 AST, noel <deletethis@invalid.lan> wrote:
On Wed, 24 Dec 2025 20:12:49 -0400, Jim Diamond wrote:
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16 >>>>> 15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2 >>>>> IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C: >>>>> from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service >>>>> error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
I don't know if the above bits from maillog tell you anything, aside >>>>> from seeing that it was continuing to insist that it couldn't look up my >>>>> SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
Jim,
This tells me everything, the DNS failures carry through!
run exactly this: postsuper -r ALL
This *should* do fresh DNS requests and send every message in your queue >>>> if you are online
Noel,
thanks for the suggestion, I was unfamiliar with that command. I will give >>> it a try next time I have this issue.
When you say "the DNS failures carry through!", are saying that postfix, >>> rather than trying a new DNS lookup for an email in the queue, doesn't
bother trying again and doubles down on its "DNS failure" thought?
If so, does that sound like a bug to you? It sounds like a bug to me, but >>> maybe there is some other issue in play which causes that behaviour to be >>> what is desired.
What is the setting for "address_verify_negative_cache" in your postfix
configuration?
address_verify_negative_cache = yes
a system using "dialup" is also a system with 'intermittent network
connectivity'. So some settings for dialup may be appropriate for your
usecase as well.
Thanks for the pointer. I'll take a look at that tomorrow. (I still think postfix should just get on with the job of sending the mail in the queue,
but if I need to apply work-arounds, I guess that is what I will need to do.)
This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996. To open this message correctly you will need to install E-mail or Usenet software that supports modern Internet standards.
Jim Diamond writes:
Sam, thanks for the thoughts. As I mentioned in another reply (well after >> your posting) when the same problem happened another time, I successfully
sent out many emails while the stuck one remained in the queue, which tells >> me that postfix was able to find my mail server for new email.
That sounds like Postfix is waiting for some time to elapse before trying to
resent the stuck email.
I am not familiar with Postfix's internal logic, but this is the most plausible explanation: if an attempt to deliver a message fails, try again only after a prescribed period of time. Even though other messages, to the same destination, are now getting delivered normally, the delayed message won't be tried again until it finishes its time in the penalty box.
Postfix might require some specific command to retry one or more held messages immediately.
Jim Diamond <zsd@jdvb.ca> wrote:
On 2025-12-28 at 01:19 AST, Rich <rich@example.invalid> wrote:
Jim <zsd@jdvb.ca> wrote:
On 2025-12-25 at 22:13 AST, noel <deletethis@invalid.lan> wrote:
On Wed, 24 Dec 2025 20:12:49 -0400, Jim Diamond wrote:
Once the network was back, I tried running the queue:
------------------
Dec 16 15:06:17 x360 postfix/postqueue[2613]: name_mask: ipv4 Dec 16 >>>>>> 15:06:17 x360 postfix/postqueue[2613]: inet_addr_local: configured 2 >>>>>> IPv4 addresses Dec 16 15:06:17 x360 postfix/qmgr[3285]: AA6B21E0B4C: >>>>>> from=<MY_ADDR>, size=2073, nrcpt=1 (queue active)
Dec 16 15:06:17 x360 postfix/smtp[2479]: AA6B21E0B4C:
to=<ntg-context@ntg.nl>, relay=none, delay=19, delays=19/0/0/0,
dsn=4.4.3, status=deferred (Host or domain name not found. Name service >>>>>> error for name=MY_SMTP_SERVER type=A: Host not found, try again)
------------------
I don't know if the above bits from maillog tell you anything, aside >>>>>> from seeing that it was continuing to insist that it couldn't look up my >>>>>> SMTP server. If you have some extra insight there, I'm all ears.
Cheers.
Jim
Jim,
This tells me everything, the DNS failures carry through!
run exactly this: postsuper -r ALL
This *should* do fresh DNS requests and send every message in your queue >>>>> if you are online
Noel,
thanks for the suggestion, I was unfamiliar with that command. I will give
it a try next time I have this issue.
When you say "the DNS failures carry through!", are saying that postfix, >>>> rather than trying a new DNS lookup for an email in the queue, doesn't >>>> bother trying again and doubles down on its "DNS failure" thought?
If so, does that sound like a bug to you? It sounds like a bug to me, but >>>> maybe there is some other issue in play which causes that behaviour to be >>>> what is desired.
What is the setting for "address_verify_negative_cache" in your postfix >>> configuration?
address_verify_negative_cache = yes
Then try a test with it set to "no" (reload/restart postfix after the change) and see if that makes a difference. The docs imply this option caches for some time the fact that an address lookup failed. If so,
this might be why some emails are getting 'stuck'.
a system using "dialup" is also a system with 'intermittent network
connectivity'. So some settings for dialup may be appropriate for your
usecase as well.
Thanks for the pointer. I'll take a look at that tomorrow. (I still think >> postfix should just get on with the job of sending the mail in the queue,
but if I need to apply work-arounds, I guess that is what I will need to do.)
Keep in mind that the 'correct' configuration settings for a mail
server that should have 24/7 connectivity will differ from one that is expected to only have intermittent connectivity. Slackware's defaults (likely very close or identical to Postfix's defaults) very likely
presume 24/7 connectivity (as that is a majority situation today in
2025) and one or more of those settings is likely what is causing the 'stuckness' factor.
address_verify_negative_cache = yes
Then try a test with it set to "no" (reload/restart postfix after the
change) and see if that makes a difference. The docs imply this option
Postfix might require some specific command to retry one or more held messages immediately.
AIUI (*cough*), that is what "sendmail -q" should do, and (as I think I mentioned earlier) that has no useful effect whatsoever.
Then the next step up the ladder is DNS resolution. Postfix is notIs nscd running? Is /etc/resolvconf.conf in effect (if on Current)? resolvconf.conf will mess with resolv.conf. Config files to write config
going to cache DNS queries by itself. If this was anything other than Slackware then my next suggestion would be to uninstall
systemd-resolved and fix /etc/resolv.conf, which never fails to fix
these kinds of issues. But, that's not the case here.
Sam <sam@email-scan.com> writes:
Then the next step up the ladder is DNS resolution. Postfix is not
going to cache DNS queries by itself. If this was anything other than
Slackware then my next suggestion would be to uninstall
systemd-resolved and fix /etc/resolv.conf, which never fails to fix
these kinds of issues. But, that's not the case here.
Is nscd running?
Is /etc/resolvconf.conf in effect (if on Current)?
resolvconf.conf will mess with resolv.conf. Config files to write config files for simple things. Yes, we are at that level of insanity.
getent hosts (whatever host you're looking at)
Jim Diamond writes:
Postfix might require some specific command to retry one or more held
messages immediately.
AIUI (*cough*), that is what "sendmail -q" should do, and (as I think I
mentioned earlier) that has no useful effect whatsoever.
Then the next step up the ladder is DNS resolution. Postfix is not going
to cache DNS queries by itself. If this was anything other than
Slackware
then my next suggestion would be to uninstall systemd-resolved and fix
/etc/ resolv.conf, which never fails to fix these kinds of issues. But, that's not the case here.
Does anything useful get logged to syslog when "sendmail -q" is run,
and no delivery attempts are made.
Does Postfix normally log something
for every delivery attempt.
Is there a config setting in Postfix that increases the logging
level.
You want to get to the point where every mail delivery attempt gets
logged, and then see what happens when "sendmail -q" does not do
anything.
You want to get to the point where every mail delivery attempt gets
logged,
All these good ideas (yours and other peoples') almost make me want to
cause the problem to happen again. ;-)
On 2025-12-31 at 09:17 AST, Sam <sam@email-scan.com> wrote:
Jim Diamond writes:
Postfix might require some specific command to retry one or more held
messages immediately.
AIUI (*cough*), that is what "sendmail -q" should do, and (as I think I
mentioned earlier) that has no useful effect whatsoever.
Then the next step up the ladder is DNS resolution. Postfix is not going
to cache DNS queries by itself. If this was anything other than
Slackware
Not necessarily... Slackware is not the only radical distro not using systemd. Fortunately.
then my next suggestion would be to uninstall systemd-resolved and fix
/etc/ resolv.conf, which never fails to fix these kinds of issues. But,
that's not the case here.
Does anything useful get logged to syslog when "sendmail -q" is run,
and no delivery attempts are made.
Nothing at all (at least now when there is nothing in the queue).
Looking at the mail log from the day in question, I see nothing there except
Dec 16 15:06:21 x360 postfix/sendmail[2615]: fatal: usage: sendmail [options]
which is a message that gets written when sendmail is called with (for example) invalid arguments.
Does Postfix normally log something
for every delivery attempt.
I believe so. Looking at the day in question, I see a number of lines like this over a short time period, which is probably when I was trying
sendmail -q -v
in futility.
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<xxx>,
relay=none, delay=0.05, delays=0.03/0.01/0/0, dsn=4.4.3,
status=deferred (Host or domain name not found. Name service error
for name=XXXX type=A: Host not found, try again)
There was a singer in the 80's called Jim Diamond ;)
On Wed, 31 Dec 2025 16:36:34 -0400, Jim Diamond wrote:
You want to get to the point where every mail delivery attempt gets
logged,
they are
All these good ideas (yours and other peoples') almost make me want to
cause the problem to happen again. ;-)
why not, then let it go to see when it actually processes it, it'll be
the mail log, I'm betting 3 days, give or take a few hours :) But if
thats the case you can shorten that time.
I'm sure you have a private email and a freemail a/c, send it to yourself from one domain to the other.
If you feel adventurous, send two messages, when you get both failing.
get the MID of one of them from "mailq" then try "postsuper -r MID"
and see if it sends, if it does all good, just wait to see how long the other takes to send.
Happy New Year!Thanks, you too! (And everyone else who is still using this newsgroup, I
Jim Diamond <zsd@jdvb.ca> wrote:
On 2025-12-31 at 09:17 AST, Sam <sam@email-scan.com> wrote:
Jim Diamond writes:
Postfix might require some specific command to retry one or more held >>>> > messages immediately.
AIUI (*cough*), that is what "sendmail -q" should do, and (as I think I >>>> mentioned earlier) that has no useful effect whatsoever.
Then the next step up the ladder is DNS resolution. Postfix is not going >>> to cache DNS queries by itself. If this was anything other than
Slackware
Not necessarily... Slackware is not the only radical distro not using
systemd. Fortunately.
then my next suggestion would be to uninstall systemd-resolved and fix
/etc/ resolv.conf, which never fails to fix these kinds of issues. But, >>> that's not the case here.
Does anything useful get logged to syslog when "sendmail -q" is run,
and no delivery attempts are made.
Nothing at all (at least now when there is nothing in the queue).
Looking at the mail log from the day in question, I see nothing there except
Dec 16 15:06:21 x360 postfix/sendmail[2615]: fatal: usage: sendmail [options]
which is a message that gets written when sendmail is called with (for
example) invalid arguments.
Does Postfix normally log something
for every delivery attempt.
I believe so. Looking at the day in question, I see a number of lines like >> this over a short time period, which is probably when I was trying
sendmail -q -v
in futility.
Dec 16 15:05:58 x360 postfix/smtp[2479]: AA6B21E0B4C: to=<xxx>,
relay=none, delay=0.05, delays=0.03/0.01/0/0, dsn=4.4.3,
status=deferred (Host or domain name not found. Name service error
for name=XXXX type=A: Host not found, try again)
Note, "probably" is not going to help you figure this one out, you need
to be sure which log lines you are looking at relate to exactly when
you try a sendmail -q -v run.
You want to see what is the last line in the log before running
sendmail -q -v, then run it, and see exactly what new lines appear
(you'd preferably do this when you say other email has gone through but
this one is stuck).
The log entry you show says the email was enqueued because at the time Postfix tried to deliver it, DNS name service lookup for the
destination failed.
OK, just for "fun", I
(1) disconnected from my LAN
(2) sent a mail (using mutt) (i.e., "tried to send a mail")
(3) observed the line in /var/log/maillog saying
... status=deferred (Host or domain name not found. Name service
error for name=<MY MAIL SERVER> type=A: Host not found, try again) (4) reconnected to the network and pinged 8.8.8.8 to make sure I was
able to reach the internet at large
(5) ran sendmail -v -q
... another "status=deferred (Host or domain name not found. ..."
message in maillog.
(6) Ran postsuper, like you suggested
(7) Got another host not found
(8) Ran sendmail -q -v
(9) Praise be! It went out.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 54 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 14:02:29 |
| Calls: | 742 |
| Files: | 1,218 |
| D/L today: |
3 files (2,681K bytes) |
| Messages: | 183,722 |
| Posted today: | 1 |