Article 6N4Y3 Postfix not able to send emails

Postfix not able to send emails

by
Astaoth
from LinuxQuestions.org on (#6N4Y3)
Hello everyone !

I have a very ennoying issue with my postfix server : I'm unable to send emails from it. For the context, it runs on top of a Debian 12, and has been working previously, meaning it could be a change from me or an update issue.

I have checked my /etc/resolv.conf, and it contains :
Code:# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.

nameserver 9.9.9.9
nameserver 149.112.112.112Actually I have changed the dns parameters in the /etc/network/interfaces in order to have well known and reliable DNS servers. The file /var/spool/postfix/etc/resolv.conf has similar entries.

In my /etc/nsswitch.conf I have :
Code:# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat systemd
group: compat systemd
shadow: compat
gshadow: files

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nisI have this config on other servers, and it works fine. The one in the postfix chroot is identical. All this files are reachable and readable by any user on the system.

As that's an old server provided without ipv6, I've tried to disable ipv6 with sysctl and in the postfix configuration (you never know, I had issue with ipv6 enabled but no public ipv6 before).

Each time I try to send an email, I have an error looking like :
Code:postfix/smtp[1807404]: 96E1568018D: to=<address@pm.me>, relay=none, delay=10, delays=0.14/0.06/10/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=pm.me type=MX: Host not found, try again)I can resolv pm.me with the "host -t mx", "host -t a", "getent ahosts pm.m" and "nslookup" commands, there are MX and matching A entries and I can ping them. In a global manner, I can ping and make curl requests to any domain it will work. However, it may be unrelated, but I can't perform an "apt update", it's unable to resolv the domains (but I can make a curl to them).

It feels like I've scrolled the whole web in order to find any kind of lead about this. I hope somone would have a new idea to check !
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments