Can't send emails

I have searched the forum for similar issues

on

This category is for general issues(=something is broken) regarding YunoHost, NOT apps.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What type of hardware are you using

Other(?)

What YunoHost version are you running

YunoHost 12.1.41.2 (stable)

How are you able to access your server

The webadmin
SSH

Are you in a special context or did you perform specific tweaking on your YunoHost instance ?

nope

Describe your issue

I am unable to send emails. I am receiving emails, so I suppose dovecot is doing OK and this should be a postfix issue?

maybe this?
NOQUEUE: reject: RCPT from unknown[10.0.1.1]: 550 5.1.1 <jose@xxxxx.casa>: Recipient address rejected: User unknown in virtual mailbox table; from=<cursos@xxxxx.eu> to=<jose@xxxxx.casa> proto=ESMTP helo=<dummy.faircode.eu>

(cursos@xxxxx.eu is the email I am hosting with yunohost)

Share relevant logs or error messages

dovecot log

postfix log

was checking the span score websites (like mail-tester.com) and I notice the emails are being sent through brevo, an SMTP relay I configured some time ago.
The thing is I already turned off the SMTP relay from yunohost settings web UI and deleted the keys from DNS records but it still keeps sending through brevo SMTP?

EDIT: created a post for this:

https://forum.yunohost.org/t/smtp-relay-wont-turn-off

the thing with the SMTP relay is fixed, I just had to wait a few hours.

Now I find out that the problem is that the emails are going out through my local machine IP, and not through the VPS/VPN I am using to expose my server publicly
(I use this configuration Cómo tener un Servidor en Casa sin limitaciones | La Wiki de Ética Digital )

Somebody could give me a clue of why this is happening, as a I am forwarding supposedly all traffice through the VPS/VPN wireguard tunnel?

thanks!

Now if I try to send an email sometimes thunderbird gives me

Recipient address rejected: User unknown in virtual mailbox table.
Please check the message recipient

and sometimes it sends the mail but it gets bounced because it tries to send it through my ISP IP and not the VPS IP

Looks like a DNS problem?

i would check “host -t mx domain.xx”
need to point to the exit node of the VPN server

it gives:

`domain.xx` mail is handled by 5 `domain.xx`.

is that as it should be?

I tried to simplify the post and made a new one here, maybe we should continue the conversation there?