# Cannot send emails

**URL:** <https://discourse.mailinabox.email/t/cannot-send-emails/11419>\
**Category:** Help with Setup/Upgrade\
**Created:** [January 21, 2024, 12:04am UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419 "2024-01-21T00:04:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmonty14](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@cmonty14](https://discourse.mailinabox.email/u/cmonty14)\
**Post date:** [January 21, 2024, 12:04am UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419/1 "2024-01-21T00:04:49Z")

</div>

Hello,  
after modifications related to BIND9 (replaced by Unbound) and NDS (service stopped) I cannot send any emails.  
Here’s the error message in `/var/log/mail.log`:

```auto
Jan 21 00:51:07 miab postfix/smtp[942335]: 4179B42854: to=<test-wtxsnl0ks@srv1.mail-tester.com>, relay=none, delay=0.45, delays=0.2/0.25/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=srv1.mail-tester.com ty
pe=MX: Host not found, try again)

```

This is pointing to an issue related to name resolution, however `dig` returns correct IP:

```auto
❯ dig mail-tester.com
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused

; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> mail-tester.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64276
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;mail-tester.com. IN A

;; ANSWER SECTION:
mail-tester.com. 3016 IN A 94.23.206.89

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sun Jan 21 01:03:10 CET 2024
;; MSG SIZE rcvd: 60

```

Can you please advise how to troubleshoot this issue?

---

<div class="post-metadata">

**Author:** ![KiekerJan](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kiekerjan/32/2339_2.png) [@KiekerJan](https://discourse.mailinabox.email/u/KiekerJan)\
**Post date:** [January 21, 2024, 1:20pm UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419/2 "2024-01-21T13:20:02Z")

</div>

Well, this is definitely something for the Unsupported Modifications subforum 😄  
Looking at the dig output:

> [@cmonty14](#):
>
> `communications error to ::1#53:`

This suggests unbound is not listening to the ipv6 local address, so check that.  
Also, enable nsd and see if that makes a difference.

---

<div class="post-metadata">

**Author:** ![cmonty14](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@cmonty14](https://discourse.mailinabox.email/u/cmonty14)\
**Post date:** [January 21, 2024, 1:55pm UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419/3 "2024-01-21T13:55:14Z")

</div>

> [@KiekerJan](#):
>
> This suggests unbound is not listening to the ipv6 local address, so check that.

I thought this setting enabled IPv6:

```auto
❯ head -n 20 /etc/unbound/unbound.conf.d/miab.conf 
server:
    # If no logfile is specified, syslog is used
    # logfile: "/var/log/unbound/unbound.log"
    verbosity: 2

    interface: 127.0.0.1
    port: 53
    do-ip4: yes
    do-ip6: yes
    do-udp: yes
    do-tcp: yes

    # You want to leave this to no unless you have *native* IPv6. With 6to4 and
    # Terredo tunnels your web browser should favor IPv4 for the same reasons
    #prefer-ip6: no

    # Use this only when you downloaded the list of primary root servers!
    # If you use the default dns-root-data package, unbound will find it automatically
    #root-hints: "/var/lib/unbound/root.hints"

```

---

<div class="post-metadata">

**Author:** ![KiekerJan](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kiekerjan/32/2339_2.png) [@KiekerJan](https://discourse.mailinabox.email/u/KiekerJan)\
**Post date:** [January 21, 2024, 5:10pm UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419/4 "2024-01-21T17:10:58Z")

</div>

You might also need  
`interface: ::0`

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [January 28, 2024, 5:11pm UTC](https://discourse.mailinabox.email/t/cannot-send-emails/11419/5 "2024-01-28T17:11:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
