Hello, I need help, I have my server with multiple domains configured, I can send mails perfectly from all my domains but I can not receive emails since they are bounced, I leave the postfix configuration file below:
See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# Line of that file to be used as the name. The Debian default
# Is / etc / mailname.
#myorigin = / etc / mailname
Smtpd_banner = $ myhostname ESMTP $ mail_name
Biff = no
Appending .domain is the MUA’s job.
Append_dot_mydomain = no
Uncomment the next line to generate “delayed mail” warnings
Just set up a new server with Virtualmin on CentOS 7, and ran into lots of problems… I think it’s related to this new install script, perhaps version 6 of VM.
SASL auth keeps failing, can’t send or receive emails at all. I spent 2 days trying to configure, and kinda gave up.
Is yours a fresh install of Virtualmin 6, or is it an existing installation that was updated to the Virtualmin 6 module (but nothing else changed). As far as I know, nothing would have changed in the mail configuration if you updated an existing installation. We’ll get it fixed, whatever it is, but right now I have no idea where the problem is; I’m hearing multiple descriptions of things that sound like completely unrelated problems (and may be completely unrelated problems).
ubuntu 16.04 here. i suspect the issue is with the recent clam update. ive got a mail.log full of “CLAMAV: couldn’t connect to: /var/run/clamav/clamd.ctl: no such file or directory”
Final-Recipient: rfc822; info-invcosmo.com@server
Original-Recipient: rfc822;info@invcosmo.com
Action: failed
Status: 5.4.4
Diagnostic-Code: X-BP-Mail-Service; Host or domain name not found. Name service
error for name=server type=AAAA: Host not found
my log file:
Aug 19 13:39:54 ns1 postfix/smtpd[20815]: connect from mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:56 ns1 postgrey[1485]: action=pass, reason=client whitelist, client_name=mail-oi0-f52.google.com, client_address=209.85.218.52, sender=jmujicab@gmail.com, recipient=info@invcosmo.com
Aug 19 13:39:56 ns1 postgrey[1485]: cleaning up old logs...
Aug 19 13:39:56 ns1 postfix/smtpd[20815]: 28D1CA180B: client=mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:56 ns1 postfix/cleanup[20818]: 28D1CA180B: message-id=<19313B4CC1BB1258.72E2FE97-A499-4341-87A5-D35AAFA76F66@mail.outlook.com>
Aug 19 13:39:57 ns1 opendkim[1630]: 28D1CA180B: s=20161025 d=gmail.com SSL
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 28D1CA180B: from=, size=4235, nrcpt=1 (queue active)
Aug 19 13:39:57 ns1 postfix/smtp[20820]: 28D1CA180B: to=, orig_to=, relay=none, delay=1.2, delays=1.1/0/0.07/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server type=AAAA: Host not found)
Aug 19 13:39:57 ns1 postfix/cleanup[20818]: 53BB5A1922: message-id=<20170819013957.53BB5A1922@ns1.bpserver.ml>
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 53BB5A1922: from=<>, size=6406, nrcpt=1 (queue active)
Aug 19 13:39:57 ns1 postfix/bounce[20962]: 28D1CA180B: sender non-delivery notification: 53BB5A1922
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 28D1CA180B: removed
Aug 19 13:39:57 ns1 postfix/smtpd[20815]: disconnect from mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:57 ns1 postfix/smtp[20820]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c00::1a]:25: Network is unreachable
Aug 19 13:39:59 ns1 postfix/smtp[20820]: 53BB5A1922: to=, relay=gmail-smtp-in.l.google.com[74.125.130.27]:25, delay=1.9, delays=0/0/0.94/0.91, dsn=2.0.0, status=sent (250 2.0.0 OK 1503106799 3si4720735pll.202 - gsmtp)
Aug 19 13:39:59 ns1 postfix/qmgr[1747]: 53BB5A1922: removed
Here’s the problem: name not found. Name service error for name=server type=AAAA: Host not found
It can be caused by one of a few things:
Your server hostname was not a fully qualified domain name that is resolvable during installation of postfix. (‘server’ is the name Postfix is trying to deliver to.)
myorigin is incorrect. Check the contents of /etc/mailname, or just change myorigin to be something reasonable. It needs to be a name that the server can resolve.
So, check your hostname:
# hostname -f
Check to be sure that name can be resolved (using host hostname, where “hostname” is whatever the hostname command above returned as the name of your server).
And, make myorigin match that (or match something that resolves to your server IP address). I usually leave myorigin at the default, but Debian/Ubuntu likes to make things complicated (and prone to failures like this). The default is $myhostname and is sensible for most deployments that only have one mail server receiving mail.
Just to update on the “update is causing it” theory: it’s not the update.
OP has a misconfiguration of myorigin in Postfix, probably caused by not having a fully qualified domain name set when /etc/mailname was set (it gets set to the system hostname when mail servers are installed, AFAIK). It’s a debian/ubuntu quirk that I’ve never been very fond of.
Yeah, if your system is not on a static IP and uses DHCP to configure the network, you have to take some extra steps to ensure hostname, name servers, etc. remains the same across boots, or you’ll find you have a number of problems.