Cannot receive email on subdomain ? Sympa + mailinabox configuration issue. maybe DNS issue?

Hello,

I have mailinbox installed on box.randome.camp, serving email for randome.camp domain and and another personal domain. (Every works fine I am very happy with mailinabox !)
I have sympa (mailing list tool) on another server at listes.randome.camp
I have set up a relay postfix, so mail send from listes.randome.camp are relayed by box.randome.camp.
Sending mail works good. Server can send email to differents email adress, no issue

My issue is when I send email to @listes.randome.camp
listes.randome.camp never receive email.

mailinabox is handling all my dns.
so I have entered an A and mx entry :
listes.randome.camp A 49.12.202.142
listes.randome.camp MX 10 listes.randome.camp.

When I check with pingability : https://pingability.com/zoneinfo.jsp?domain=listes.randome.camp#a1024897881
I get an error for the mail server part : No MX records for ‘listes.randome.camp’, using its A record(s).

If I try to send an email to xxx@listes.randome.camp, i get the followining error message :

NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <xxx@listes.randome.camp>: Recipient address rejected: User unknown in virtual mailbox table; from=<AAAAA@otherdoamin.com> to=<xxx@listes.randome.camp> proto=ESMTP helo=<box.randome.camp>

Any idea ?

You are sending email for listes.randome.camp to the mailserver on the server hosting Sympa, and it is failing as the user there is not accepting emails (probably no users are).

I will assume that you have added a user for the domain listes.randome.camp (xxx@listes.randome.camp) to your MiaB install at box.randome.camp.

You need to enter a MX record for listes.randome.camp pointing to your MiaB at 'box.randome.camp` on your MiaB custom DNS page.

for the mail relay, I am using a different user : listes@randome.camp. because I didn’t to interfere with the listes.randome.camp domain

I have a catch all send, so any user from @listes.randome.camp can send email, as suggested in the relay set up instruction.
So on my MiaB, I dont have any user created for @listes.randome.camp

but I can try what you are explaining :
1_ create a user like sympa@listes.randome.camp (and make it the user for postfix relay auth)
2_ change the DNS as suggested

So…

i have created a user
sympa@listes.randome.camp
This user is now the sals auth user for the relay on the server listes.randome.camp

I have change the DNS :
listes.randome.camp A 49.12.202.142
listes.randome.camp MX 10 box.randome.camp.

btw the sub domain listes.randome.camp is not in the drop down liste of domain,like your screen sho shows, only randome.camp

I have created the catch all listes.randome.camp send as sympa@listes.randome.camp

With only that, I could send email from the web interface no issue.
but if sending email to the mailing liste from a mil client, I would get the error :

NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 test1-listepublique@listes.randome.camp: Recipient address rejected: User unknown in virtual mailbox table; from=feydreva@paradize.io to=test1-listepublique@listes.randome.camp proto=ESMTP helo=<box.randome.camp>

So I added sympa@listes.randome.camp for catch allreceving email.
Now the issue, is when I send an email from ma mail client to the mailing liste, test1-listepublique@listes.randome.camp, email goes to the inbox of sympa@listes.randome.camp

email never reach listes.randome.camp, the sympa server, for processing (and beeing send to listes member)

For syamp to work, it need to be able to receive email I think …

So I put back the DNS like this :
listes.randome.camp MX 10 listes.randome.camp.
So email should be routed to the listes.randome.camp server

but it seems the maib with domain randome.camp intercept all mail and doesn’t know what to do with it…

NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 test1-listepublique@listes.randome.camp: Recipient address rejected: User unknown in virtual mailbox table; from=feydreva@paradize.io to=test1-listepublique@listes.randome.camp proto=ESMTP helo=<box.randome.camp>

I don’t know what to do do get email send to XXX@listes.randome.camp to arrive to the listes.randome.camp server

Why?

It appears that Sympa is designed to send directly to the internet …

When I check with dig it looks as it should be and displays the MX records, so I suspect this is an issue with the tool that you are using to check with. However, at this point the MX records are incorrect. More later…

In my first response, I stated correctly that you were sending emails to the Sympa server, but assumed incorrectly that you wanted them to be sent to the MiaB server.

So to correctly do this, remove the user on the MiaB box for username@listes.randome.camp – I am not sure which user you added. If more than one, remove them all.

Then on the Custom DNS page enter listes in the Name (subdomain) box with the dropdown set to randome.camp.

At present you have 2 MX records for listes.randome.camp - one pointing to MiaB and the other to the Sympa server. This is not correct. You need just the one for listes.randome.camp.

I do not understand how and where you have:

Nowhere in the Sympa documentation does it state to do this so I am wondering what you are doing here?

Not relay it to box.randome.camp as Sympa is expecting mail to be delivered locally per the transport maps defined within postfix on that server, per the documentation. If you are relaying mails destined for listes to the MiaB, it is going to be intercepted by the MiaB server and dealt with appropriately. Appropriately being defined from the perspective of the MiaB server, not the Sympa server.

You also need to set rDNS on the Sympa server at Hetzner or most providers will reject your emails. And you’ll need to set a TXT SPF record as well in DNS for `listes.randome.camp’.

So my conclusion is that you have created a level of complexity that is not supported by Sympa, for a reason that is not apparent…

Hello, Thank you for taking the time to answer me.

In sympa documentation, they just want a MTA running.
I though about using postfix as a relay, to send email through miab, because miab as good configuration and email comming out of Miab as good reputation and is not seen as spam.
On sympa mailing list, in french, there are multiple user having their “thrusted” mail server on one vps, and sympa on an another vps, and local mta on sympa machine relaying to the mail server.
That’s where the idea comes from.

I agree, that is not correct.
It seems as soon as you create a user on a domain/subdomain, Miab creates the mx rules.
as you can see in the screen shot, It is not user configured.

So I deletted user : sympa@listes.randome.camp
there are no user nor alias on miab with @listes.randome.camp on miab
I have check DNS on MIAB, looks good now.
After few minutes, Dig mx results looks also good :

[feydreva@spychea ~]$ dig listes.randome.camp mx
; <<>> DiG 9.18.15 <<>> listes.randome.camp mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5534
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;listes.randome.camp. IN MX
;; ANSWER SECTION:
listes.randome.camp. 86386 IN MX 10 listes.randome.camp.
;; Query time: 0 msec
;; SERVER: 10.0.0.1#53(10.0.0.1) (UDP)
;; WHEN: Sun Jun 04 23:06:04 CEST 2023
;; MSG SIZE rcvd: 64

So email now send to XXX@lsites.randome.camp should be handled by listes.randome.camp

OK Done

hmm OK. so it has nothing to do with maib.
I really though of doing good using maib to send mail and just relay mail from sympa server

I guess I will start over my postfix configuration and learn to do it then :slight_smile:

Thank you for your time and help.
I will let you know how it goes.

When the right conditions are met, correct. Sadly the underlying VPS provider has a lot to do with it. Much less MiaB specifically.

I see and this makes sense. It could work fine, just not so much with MiaB being involved, since MiaB wants to control DNS as well. But even if you could overcome that, MiaB requires there to be an account (or alias/catchall) for the from address, so that makes things difficult, actually impossible, I believe. :frowning:

I do see that my AnyMXrelay SMTP relay may be something that could help those users you mentioned as long as the mailing lists are double-opt in and can be rate limited to a max of 300 per hour sending.

Can you link me to the discussion(s) of this on the Archive? fr - Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa - arc