@ChriChri ldapsearch ran perfectly. I did not have to assign any special rights. The output with my main domain was also completely fine. It all looks very good.
I then ventured into debugging.
In one terminal I ran tail -f /var/log/mail.info and in another I ran the command sendmail -bv me@mydomain.com. (Note: mydomain.com is the main domain of the Yunohost server and me@mydomain.com is my Yunohost admin)
The following output appeared in the log file:
postfix/pickup[1297398]: C18FC602B19: uid=0 from=<root>
postsrsd[1298323]: srs_forward: <root@mydomain.com> not rewritten: Domain excluded by policy
postfix/cleanup[1298321]: C18FC602B19: message-id=<20240702193627.C18FC602B19@mydomain.com>
postfix/qmgr[1253983]: C18FC602B19: from=<root@mydomain.com>, size=244, nrcpt=1 (queue active)
postfix/pipe[1298325]: C18FC602B19: to=<me@mydomain.com>, relay=dovecot, delay=2.9, delays=2.8/0/0/0.03, dsn=5.1.1, status=bounced (user unknown)
postsrsd[1298323]: srs_forward: <""> not rewritten: No at sign in sender address
postfix/cleanup[1298321]: CA725602B39: message-id=<20240702193627.CA725602B39@mydomain.com>
postfix/bounce[1298330]: C18FC602B19: sender non-delivery notification: CA725602B39
postfix/qmgr[1253983]: CA725602B39: from=<>, size=1935, nrcpt=1 (queue active)
postsrsd[1298323]: srs_forward: <""> not rewritten: No at sign in sender address
postfix/cleanup[1298321]: CBBC0602B16: message-id=<20240702193627.CBBC0602B16@mydomain.com>
postfix/bounce[1298327]: C18FC602B19: sender delivery status notification: CBBC0602B16
postfix/qmgr[1253983]: CBBC0602B16: from=<>, size=1699, nrcpt=1 (queue active)
postfix/qmgr[1253983]: C18FC602B19: removed
I assume this is the interesting line:
postfix/pipe[1298325]: C18FC602B19: to=<me@mydomain.com>, relay=dovecot, delay=2.9, delays=2.8/0/0/0.03, dsn=5.1.1, status=bounced (user unknown)
But this said nothing new.
A mail to root was not delivered.
I then added the following to /etc/postfix/main.cf:
debug_peer_list = mydomain.com
And reload postfix with
postfix reload
But that didn’t help either.
One more note: when I want to create an e-mail mailbox with this (or another) user using Thunderbird, the Thunderbird test recognises the server settings (port, etc.), but it does not recognise the user/password. The connection can therefore not be established. (I have looked up the necessary steps and settings again in the Yunohost documentation).
Sending from the console via sendmail me@otherdomain.com to an external mail server works, by the way.
What now?