I’ve finally found the cull print of this error: when using Sharebymail there is an extra Reply-To header added with the email addres of the Nextcloud user. Free mail services like Yahoo & AOL cannot find the mailbox of that user hence the 550 error.
So when you use postfix
this problem can easily be solved by replacing these Reply-To headers with the mailaddres your Nextcloud instance is using to send out mails. The only downside is that when a user replies to this kind of mails (which rarely occurs imo), the mail is send to the Nextcloud mailbox instead of the mailbox of the user who is sharing the file. A small downside if you ask me.
So in postfix
you need to perform these 2 steps:
Add this line to /etc/postfix/main.cfg
smtp_header_checks = regexp:/etc/postfix/header_check
Then create this file header_check
and add the following line:
/Reply-To:.*/ REPLACE Reply-To: <mailaddres of your nextcloud instance>
And restart the postfix
service. From now one Sharebymail will work!
[Update 10/2022]
Update: it turns out that it can be solved much easier than I thought earlier.
Instead of replacing the mail headers, there is an option buried in the share settings which achieves the same thing:
Sharing → Share by mail
And de-activate the option Reply to initiator
In this way the From mailaddres is not changed by Nextcloud