# Can't send emails (SMTP) - User unknown in virtual mailbox table

**URL:** <https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312>\
**Category:** Support\
**Tags:** mail, dovecot, postfix, english\
**Created:** [November 5, 2026, 11:05am UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312 "2026-11-05T11:05:34Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 2:05am UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/21 "2026-11-07T02:05:35Z")

</div>

ok, so I should just change the last line to  
`AllowedIPs = 0.0.0.0/0`  
right?

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 2:12am UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/22 "2026-11-07T02:12:52Z")

</div>

> [@otm33](#):
>
> on the server side, allowing outgoing traffic from the tunnel.

how exactly do I achieve this? modifying the wireguard tunnel conf file? any hints of what I should add/remove?

the actual file now (in the local/client/YNH/home side) is:

```conf
[Interface]
Address = 10.0.1.2/32
PrivateKey = <VALOR postcloud.key del SERVIDOR LOCAL>

[Peer]
PublicKey = <VALOR vps.pub del VPS>
PresharedKey = <VALOR postcloud-vps.psk del SERVIDOR LOCAL>
AllowedIPs = 10.0.1.1/32
Endpoint = <IP del VPS>:51820
PersistentKeepalive = 25

```

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [November 7, 2026, 7:34am UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/23 "2026-11-07T07:34:39Z")

</div>

Change

```auto
[Interface]
Address = 10.0.1.2/32
PrivateKey = <VALOR postcloud.key del SERVIDOR LOCAL>

[Peer]
PublicKey = <VALOR vps.pub del VPS>
PresharedKey = <VALOR postcloud-vps.psk del SERVIDOR LOCAL>
AllowedIPs = 10.0.1.1/32
Endpoint = <IP del VPS>:51820
PersistentKeepalive = 25

```

to

```auto
[Interface]
Address = 10.0.1.2/32
PrivateKey = <VALOR postcloud.key del SERVIDOR LOCAL>

[Peer]
PublicKey = <VALOR vps.pub del VPS>
PresharedKey = <VALOR postcloud-vps.psk del SERVIDOR LOCAL>
AllowedIPs = 0.0.0.0/0
Endpoint = <IP del VPS>:51820
PersistentKeepalive = 25

```

And modify only the masquerade rule

```auto
[Interface]
Address = 10.0.1.1/32
ListenPort = 51820
PrivateKey = <VALOR vps.key del VPS>
PostUp = sysctl -w net.ipv4.ip_forward=1
PostUp = sysctl -w net.ipv6.conf.all.forwarding=1
PostUp = iptables -t nat -A PREROUTING -i <Dispositivo de RED del VPS> -p udp --dport 51820 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -i <Dispositivo de RED del VPS> -p tcp --dport 22 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -i <Dispositivo de RED del VPS> -j DNAT --to-destination 10.0.1.2
# this rule is quite weird : PostUp = iptables -t nat -A POSTROUTING -o %i -j MASQUERADE = should not be the wg interface
# should be = PostUp = iptables -t nat -A POSTROUTING -o [the VPS interface: e.g ens18] -j MASQUERADE

PostDown = iptables -t nat -D PREROUTING -i <Dispositivo de RED del VPS> -p udp --dport 51820 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -i <Dispositivo de RED del VPS> -p tcp --dport 22 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -i <Dispositivo de RED del VPS> -j DNAT --to-destination 10.0.1.2
# same here = PostDown = iptables -t nat -D POSTROUTING -o %i -j MASQUERADE
# should be PostDown = iptables -t nat -D POSTROUTING -o ens18 or something else -j MASQUERADE
PostDown = sysctl -w net.ipv4.ip_forward=0
PostDown = sysctl -w net.ipv6.conf.all.forwarding=0

[Peer]
PublicKey = <VALOR postcloud.pub del SERVIDOR LOCAL>
PresharedKey = <VALOR postcloud-vps.psk del SERVIDOR LOCAL>
AllowedIPs = 10.0.1.2/32

```

Running `ip a` on the vps will show the real interface name.

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 6:11pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/24 "2026-11-07T18:11:28Z")

</div>

ok. changed all this.

on the VPS side`ip a`

```auto
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 24:14:88:b5:0b:c2 brd ff:ff:ff:ff:ff:ff
    altname enp1s0
    altname enx241488b50bc2
    inet 200.14.81.182/25 brd 200.14.81.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2803:29e0:2:8e27::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::2614:88ff:feb5:bc2/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever
4: vps: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet 10.0.1.1/32 scope global vps
       valid_lft forever preferred_lft forever

```

so my vps.conf file on the VPS side is:

```auto
[Interface]
Address = 10.0.1.1/32
ListenPort = 51820
PrivateKey = *********
PostUp = sysctl -w net.ipv4.ip_forward=1
PostUp = sysctl -w net.ipv6.conf.all.forwarding=1
# PostUp = iptables -t nat -A PREROUTING -i eth0 -p udp --dport 10000 -j DNAT --to-destination 10.0.1.2:10000
# PostUp = iptables -A FORWARD -p udp -d 10.0.1.2 --dport 10000 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -i eth0 -p udp --dport 51820 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 22 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -i eth0 -j DNAT --to-destination 10.0.1.2
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# PostDown = iptables -t nat -D PREROUTING -i eth0 -p udp --dport 10000 -j DNAT --to-destination 10.0.1.2:10000
# PostDown = iptables -D FORWARD -p udp -d 10.0.1.2 --dport 10000 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -i eth0 -p udp --dport 51820 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 22 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -i eth0 -j DNAT --to-destination 10.0.1.2
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PostDown = sysctl -w net.ipv4.ip_forward=0
PostDown = sysctl -w net.ipv6.conf.all.forwarding=0

[Peer]
PublicKey = *********
PresharedKey = *********
AllowedIPs = 10.0.1.2/32

```

(notice there were a couple of PostUp/PostDown lines that appeared there, I don’t know from where… so I just commented them out)

And the vps.conf on my local YNH machine:

```auto
[Interface]
Address = 10.0.1.2/32
PrivateKey = *******
# ListenPort = 51820

[Peer]
PublicKey = *******
PresharedKey = ********
AllowedIPs = 0.0.0.0/0
Endpoint = 200.14.81.***:51820
PersistentKeepalive = 25

```

But problem trying to send mail persists (I havent restarted postfix/dovecot, just the tunnels)

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [November 7, 2026, 8:05pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/25 "2026-11-07T20:05:49Z")

</div>

Now, what do return

```auto
ip route show
ip route get 134.98.158.159
curl -4 ifconfig.me

```

?

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 8:38pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/26 "2026-11-07T20:38:33Z")

</div>

> [@otm33](#):
>
> `ip route show`

default via 192.168.1.1 dev enp1s0  
169.254.0.0/16 dev enp1s0 scope link metric 1000  
192.168.1.0/24 dev enp1s0 proto kernel scope link src 192.168.1.6

> [@otm33](#):
>
> `ip route get 134.98.158.159`

134.98.158.159 dev vps table 51820 src 10.0.1.2 uid 0  
cache

> [@otm33](#):
>
> `curl -4 ifconfig.me`

200.14.81.182

---

<div class="post-metadata">

**Author:** ![Sanook](https://forum.yunohost.org/user_avatar/forum.yunohost.org/sanook/32/12499_2.png) [@Sanook](https://forum.yunohost.org/u/Sanook)\
**Post date:** [November 7, 2026, 8:51pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/27 "2026-11-07T20:51:21Z")

</div>

> [@geoma](#):
>
> `eticadigital.eu. 0 IN TXT "v=spf1 mx a -all"`

The ip address which is allowed to send mails is missing.

Should look like  
`v=spf1 mx ip4:xxx.xxx.xxx.xxx ip6:xxxx::1 -all`

> [@geoma](#):
>
> > [@Sanook](#):
> >
> > It’s just one line in /etc/postfix/main.cf:  
> > "relayhost = "
> 
> So what should I do here?

`relayhost = your.smart.host.of.your.isp.cl`

The relayhost is usually your outgoing mail server of your ISP.

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 9:26pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/28 "2026-11-07T21:26:54Z")

</div>

> [@Sanook](#):
>
> The ip address which is allowed to send mails is missing.
> 
> Should look like  
> `v=spf1 mx ip4:xxx.xxx.xxx.xxx ip6:xxxx::1 -all`

So I should change the DNS records at the domain name provider?  
For all domains I followed Yunohost DNS suggestions of the WebUI

 ![image](https://forum.yunohost.org/uploads/default/original/2X/8/8109317027c4410cec6ba055e937308b686d55c9.png)

> [@Sanook](#):
>
> `relayhost = your.smart.host.of.your.isp.cl`
> 
> The relayhost is usually your outgoing mail server of your ISP.

My ISP support is non existent. I have no idea if they have a smarthost or not. I would guess probably not. I’ve tried asking them but the agents that try to help me really don’t know and don’t have a way of finding out.  
Is there a way in which I could bypass my ISP and just direct all the traffic (including SMTP) to the VPS and use the VPS to send the emails?

PS. Thanks for all your help @Sanook and @otm33. You wouldn’t imagine how grateful I am, even if we don’t manage yet to achieve success. My former paid hosting is due tomorrow and if I don’t manage to work it out for tomorrow, I’ll probably have to hire an external email service like [mailbox.org](http://mailbox.org).

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [November 7, 2026, 10:25pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/29 "2026-11-07T22:25:24Z")

</div>

Can you run `mailq` and check the output ?  
I think you need to set the reverse DNS.

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 7, 2026, 10:32pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/30 "2026-11-07T22:32:18Z")

</div>

> [@otm33](#):
>
> `mailq`

`Mail queue is empty`

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [November 7, 2026, 10:33pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/31 "2026-11-07T22:33:05Z")

</div>

Even after trying sending an email ?

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 8, 2026, 5:48pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/32 "2026-11-08T17:48:04Z")

</div>

yes, but mails are being sent now!! and from the VPS IP! thanks a loooot!! 🙏

But with some emails ( for example one of the emails I have on my former hosting, which is on the domain geoma.casa), thunderbird still says:

```auto
Sending of the message failed.
An error occurred while sending mail. The mail server responded:
<jose@geoma.casa>: Recipient address rejected: User unknown in virtual mailbox table.
Please check the message recipient "jose@geoma.casa" and try again.

```

Also,  
[mail-tester.com](http://mail-tester.com) does say I have to configure reverse DNS though  
Where can I find instructions for configuring reverse DNS?

And it also says my DKIM signature is invalid  
I have regenerated dkim conf with  
`yunohost tools regen-conf opendkim`  
And I configured the DNS with the DKIM I am given by YNH WebUI on domain-DNS…  
Is there something else I should check?

thanks a lot guys 🙏 🙇‍♂️ ❤

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [November 8, 2026, 6:14pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/33 "2026-11-08T18:14:38Z")

</div>

> Where can I find instructions for configuring reverse DNS?

Maybe asking to your vps provider.

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 10, 2026, 2:48am UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/34 "2026-11-10T02:48:31Z")

</div>

this was what solved it.  
Thanks a lot @otm33 and @Sanook .  
I updated the changes here:

> **[Cómo tener un Servidor en Casa sin limitaciones](https://wiki.eticadigital.eu/es/servidor_en_casa)**

Hoping it helps somebody else too

thanks a lot!!

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 10, 2026, 7:47pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/35 "2026-11-10T19:47:53Z")

</div>

> [@geoma](#):
>
> And it also says my DKIM signature is invalid

double/triple check your DKIM keys. They all look kinda alike and it is easy when you have different domains to get them messed up.

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 10, 2026, 7:50pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/36 "2026-11-10T19:50:00Z")

</div>

thanks to the help of this forum, I achieved A+ grade

 ![image](https://forum.yunohost.org/uploads/default/original/2X/b/b8549fff9374701a0645245c376870bf5ffcf5b3.jpeg)

---

<div class="post-metadata">

**Author:** ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)\
**Post date:** [November 11, 2026, 12:37pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/37 "2026-11-11T12:37:07Z")

</div>

> [@geoma](#):
>
> the diagnosis page is useless to me, as it doesn’t incorporate the info that I am using a wireguard VPN so it checks for the local IP. so it gives a whole bunch of errors but they really don’t apply to my situation.

I guess diagnosis is now ok on your side, cause the problem was that your system was not routing the outgoing traffic through your VPN… `AllowedIPs = 0.0.0.0/0` fixed that

---

<div class="post-metadata">

**Author:** ![geoma](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@geoma](https://forum.yunohost.org/u/geoma)\
**Post date:** [November 11, 2026, 8:14pm UTC](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312/38 "2026-11-11T20:14:08Z")

</div>

yes! you are totally right!!  
thanks a lot @ljf for letting me know!

now the thing I am still lacking is IPv6 for the wireguard tunnel.  
So my IPv6 adresses are still messed up in the diagnosis page.  
If somebody would like to help with this, we can further complete the tutorial here:

> **[Cómo tener un Servidor en Casa sin limitaciones](https://wiki.eticadigital.eu/es/servidor_en_casa)**

and maybe translate it to english/french and put it somewhere in the YNH documentation?

thanks!

[Previous page](https://forum.yunohost.org/t/cant-send-emails-smtp-user-unknown-in-virtual-mailbox-table/43312.md?page=1)
