J’ai corrigé le même problème en ajoutant des aliases à mes utilisateurs. Ainsi, postfix détecte que le mail n’a pas besoin d’être relayé en externe et le traite en local dès qu’il le reçoit de l’utilisateur.
I solved by addind aliases to users. Thus, postfix does not relay email externaly but directly process it.
Sorry, I think what is missing is the login. Your server needs to log in to your provider’s smtp server to be allowed to submit emails. See, the example main.cf under “Setup the relay server” in the howto linked above.
And then, you provider also needs to allow your sender addresses. If it does not simply allow all addresses *@your.domain, some may require creating separate accounts, or additional addresses at the provider.
Err, the sender address rejection errors are from your own server not gandi’s, right?
Of course the users need to exist on the yunohost.
But, it looks that actually relay1-d.mail.gandi.net tried to forward your message. So you may have to add a couple of gandi relays to mynetworks instead.
I come late in this subject. I had the very same error message recently, when switching forth and back to smtp.free.fr and localhost. It might be another configuration but I’ll write it here, might be useful for someone.
My smtp localhost:587 is not open outside (not port routing). In the Rainloop configuration, the box “use authentication” was unchecked (I don’t remember if it the default or not). It works. It might also works with some internet providers because you are on their network, behind the box. BUT … some emails are refused with this Sender address rejected: not logged in (in reply to RCPT TO command). Including emails send from Yunohost to Yunohost.
If you use authentication for SMTP, this problem is solved.
Please, note that my solution will only work for new messages, as it improve the rule of the local SMTP distribution. Mail already outside (it was my cases when local users sent emails to other local users via external address) will stay outside and rejected.
I can send email with Gandi’s SMTP to all email adresses but those belonging to our server.
My setup to send email is STARTLS 587 password.
The problem is not to be "accepted"by Gandi’s SMTP, that’s ok and it’s working.
The problem is when I send email to one of our server. It’s our entering email server that don’t accept email with our domain name but coming from Gandi’s SMTP server.
I’m just wondering, Postfix is the SMTP server right?
The IMAP server is Dovecot, no?
So why are we trying to setup Postfix whereas our problem is for receiving emails that has been sent from an external SMTP server?
Should I not setup something in Divecot instead?
That is the problem I was facing a few weeks ago. Using smtp.free.fr I could send emails to any address outside but not to my own domain. With the same error message. Right now I’m using localhost:587 with authentication. And therefor I don’t have the problem.
When you send an email, you are authenticated on thatoo.com, but is your relay configuration using authentication as well ? A user/password in an encrypted file like described somewhere in the postfix documentation ?