SMTP after upgrade is not resolving via DNS

Upgraded to version 67 and now outgoing mail doesn’t work. Posqueue -p has mail backing up in it. If i ping is no longer resolves to an ip address. Not sure what to do, i tried postqueue -f and no luck.

Try checking to see if DNS is running…

DNS is working, but I don’t see smtp listed as a record. also mail is not sending, just piling up according to postqueue -p

(connect to[]:25: Connection timed out)

(connect to[2607:f8b0:4023:401::1b]:25: Network is unreachable)

is what postqueue -p shows. ive tried restarting nsd

I can see from your message that DNS resolution is working fine. It looks to me like your outbound port 25 access is being blocked. What did you upgrade from? Did your IP address change?

SSH disallows password-based login.
System software is up to date.
Mail-in-a-Box is up to date. You are running version v67.
System administrator address exists as a mail alias. [ ↦]
The disk has 41.99 GB space remaining.
System memory is 49% free.
Firewall is active.
Outbound mail (SMTP port 25) is not blocked.
IP address is not blacklisted by
DNSSEC ‘DS’ record is set correctly at registrar.
Nameserver glue records are correct at registrar. [ns1/ ↦]
Domain resolves to box’s IP address. [ ↦ / 2600:1f14:335:e900:f62e:6acb:62ec:bc40]

I upgraded from 62 and ip hasn’t changed. above is the status page

Are you able to manually connect to port 25 of those 2 addresses from your MiaB server?

You can try this using telnet:

telnet 25


telnet 2607:f8b0:4023:401::1b 25

ubuntu@box:~$ postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
BF3203F1CB 4978669 Wed Feb 7 15:03:21
(Host or domain name not found. Name service error for type=A: Host not found)

65C3E3F1DD 4978609 Wed Feb 7 15:07:43
(Host or domain name not found. Name service error for type=A: Host not found)


tim@DCW10-J5Q21QO:~$ telnet 25
Connected to
Escape character is ‘^]’.
220 ESMTP Hi, I’m a Mail-in-a-Box (Ubuntu/Postfix; see

ubuntu@box:~$ telnet 25
Connected to
Escape character is ‘^]’.

not sure if this really connected?

Yes, they connected.

It looks like it’s complaining that it cannot lookup Which is odd. It shouldn’t be doing that. Furthermore, you don’t have your IPv6 PTR record setup, so that will cause problems if your MiaB server tries to use IPv6 for sending email (which it is doing above with google).

  1. make sure the reverse DNS is set for IPv6 on your server.
  2. try to figure out why is suddenly in play.

(Host or domain name not found. Name service error for type=AAAA: Host not found)

BF3203F1CB 4978669 Wed Feb 7 15:03:21
(Host or domain name not found. Name service error for type=AAAA: Host not found)

BBC403FAD4 6643 Thu Feb 8 14:07:33
(Host or domain name not found. Name service error for type=AAAA: Host not found)

269AE3F79A 63929 Thu Feb 8 12:53:56
(delivery temporarily suspended: Host or domain name not found. Name service error for type=AAAA: Host not found)

now these are starting to stack up. I have fixed reverse for IPv6

I’m not sure what to do from here and company outgoing emails are stacking up… Any suggestions? I need to figure this out, mailinabox has worked great for 6 months and now this… I won’t update again if I can get this back to working!

You are going to need to figure out why it’s trying to use the name That’s incorrect. It should be I just grep’ed recursively through my entire /etc directory and there is zero instances of in there.

I would start start by looking for places this name appears in your system.
Recursive grep can be done like this:
sudo grep -rs /etc

Also, are you using external DNS or letting MiaB handle DNS? Go to your admin page - Mail-in-a-Box Control Panel, go into the “external DNS” page and search for occurrences of “smtp” on that page. I have none on my server.

I guess I should start with the basics. What is the hostname of your MiaB mail server? Let’s say your domain is The recommended is “box”, so it would be I don’t use “box”. I use “mail”, so mine is But there seems to be confusion here, because your initial post is that you cannot resolve “”. Later on in postings I see “” showing up. There has to be one name. Maybe that has become confused.

Also, /etc/mailinabox.conf will show the name (at least the name that MiaB thinks it should be). Also, I would recommend whatever name you choose, you put that name in /etc/hostname. And don’t change the name. That will probably not work out as cleanly as you would expect.

To make sure your MiaB is working internally, I suggest you try the following steps and see if it will send an email to a local email account.

  1. Start telnet using:

    telnet 25


     Connected to
     Escape character is '^]'.
     220 ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see
  2. Introduce your domain using the EHLO command:


     250-SIZE 134217728
     250 CHUNKING
  3. Set “mail from” to

    mail from:


     250 2.1.0 Ok
  4. Set the recipient email address also to a

    rcpt to:


     250 2.1.5 Ok
  5. Run data command:



     354 End data with <CR><LF>.<CR><LF>
  6. Paste the following text:

    subject: Internal Mail-in-a-Box email test
    Just sent an email to myself.


     250 2.0.0 Ok
  7. Terminate the session with the quit command:



     221 2.0.0 Bye
     Connection closed by foreign host.

Check if received an email.
If you didn’t receive an email, look for the email you just used in the mail.log file located at:


Check if there is an error message and what the error number is.

I suspect that at some point the postfix server configuration was changed from to

You can search the term “” in /etc directory as follows:

grep -irl "" /etc

This will list all files that contains the term “”.

Then repeat the search also for the term “” as follow:

grep -irl "" /etc
My grep output looks like this:


You can compare the output given for “smtp” and for “box” to see if there is actually a misconfiguration that points to “smtp” instead of “box”.

I grep’d and only place i saw it was in relay host setting in /etc/postfix/
I removed that entry in the file.
My box has been and i never changed it.

I was able to send mail to myself by telnetting in, that worked just fine.

after removing it, i got this now:
ubuntu@box:~$ sudo postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
B9B353F79B* 1405498 Thu Feb 8 16:35:18

B40F73F79C* 15435 Thu Feb 8 12:55:10

65C3E3F1DD* 4978609 Wed Feb 7 15:07:43

269AE3F79A* 63929 Thu Feb 8 12:53:56

BF3203F1CB* 4978669 Wed Feb 7 15:03:21

BBC403FAD4* 6643 Thu Feb 8 14:07:33

42EDA3F79D* 32139 Thu Feb 8 13:49:07

ALSO in the file /etc/mailinabox.conf the name is

so, removing the smtp relay from the file and rebooting, caused lookup failures and I then changed /etc/resolv.conf to have nameserver other than localhost and the mails have all sent out!! Why it keeps changing my resolv.conf is crazy but for now its working!!! Thank you for all the help!!!

Regarding your “resolv.conf” reset issue, see this post and then head over to this post that explains how to set a permanent resolv.conf file using “netplan”

My yaml file looks like this:

    # This file describes the network interfaces available on your system
    # For more information, see netplan(5).
      version: 2
      renderer: networkd
          dhcp4: false
          dhcp6: false
            -               # Your IPv4 public address.
            - "xxxx:xxxx:xxxx:xxxx::xxxx/xx"   # Your IPv6 primary  address.
          gateway4:            # Your IPv4 gateway.
          gateway6: "xxxx::xxxx"               # Your IPv6 gateway.
            search: []          # Most times this is provided by your cloud service provider.
            addresses:                         # DNS Server IP addresses.
              - ::1

Thank you for all the help! You guys are amazing!!