Hi,
When a user enables the autoreply feature in SOGo, outgoing messages are generated with a malformed FROM address using the internal hostname (mail.myserver.be.localhost) rather than the actual mail domain (myserver.be). Since neither SPF nor DKIM can validate this internal domain, Gmail rejects the message with a 550 5.7.26 authentication failure.
EDIT : MAIL_DOMAIN and LDAP_DOMAIN are correctly set in the environment config file.
De: Mail Delivery System <MAILER-DAEMON@mail.myserver.be.localhost>
Objet: Undelivered Mail Returned to Sender
Date: 27 juillet 2026 à 11:40:43 UTC+2
À: user@mail.myserver.be.localhost
This is the mail system at host mail.myserver.be.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<someone@gmail.com>: host gmail-smtp-in.l.google.com[142.251.127.27] said:
550-5.7.26 Your email has been blocked because the sender is
unauthenticated. 550-5.7.26 Gmail requires all senders to authenticate with
either SPF or DKIM. 550-5.7.26 550-5.7.26 Authentication results:
550-5.7.26 DKIM = did not pass 550-5.7.26 SPF [mail.myserver.be.localhost]
with ip: [188.34.138.54] = did not 550-5.7.26 pass 550-5.7.26 550-5.7.26
For instructions on setting up authentication, go to 550 5.7.26
https://support.google.com/mail/answer/81126#authentication
ffacd0b85a97d-47f86b0b8e6si30927831f8f.302 - gsmtp (in reply to end of DATA
command)
Reporting-MTA: dns; mail.myserver.be
X-Postfix-Queue-ID: 9ECF513068B0
X-Postfix-Sender: rfc822; user@mail.myserver.be.localhost
Arrival-Date: Mon, 27 Jul 2026 09:40:42 +0000 (UTC)
Final-Recipient: rfc822; someone@gmail.com
Original-Recipient: rfc822;someone@gmail.com
Action: failed
Status: 5.7.26
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.26 Your email has been blocked because the
sender is unauthenticated. 550-5.7.26 Gmail requires all senders to
authenticate with either SPF or DKIM. 550-5.7.26 550-5.7.26
Authentication results: 550-5.7.26 DKIM = did not pass 550-5.7.26 SPF
[mail.myserver.be.localhost] with ip: [188.34.138.54] = did not 550-5.7.26
pass 550-5.7.26 550-5.7.26 For instructions on setting up authentication,
go to 550 5.7.26
https://support.google.com/mail/answer/81126#authentication
ffacd0b85a97d-47f86b0b8e6si30927831f8f.302 - gsmtp
De: <user@myserver.be>
Objet: Auto: Re: Planning des prochains mois
Date: 27 juillet 2026 à 11:40:42 UTC+2
À: Someone <someone@gmail.com>
Bonjour,
Je suis en congé et je reviendrai le lundi 27 juillet.
A bientôt !
How would I correct this ?
Thanks
Matthieu