Closed DrunkMunki closed 9 months ago
Sorry for the delay...
Hmmmm, nice catch here. Guess I never considered IP-based auth without RELAY_USER
and RELAY_PASS
.
The way it works now, I echo them out, but if they're blank, it echos the colon :
which is probably being read as a blank username before and a blank password after.
Thoughts on an if statement? If the RELAY_USER
and RELAY_PASS
are blank, it won't echo them.
if [ -n "$RELAY_USER" ] && [ -n "$RELAY_PASS" ]; then
echo "[$RELAY_HOST]:$RELAY_PORT $RELAY_USER:$RELAY_PASS" > /etc/postfix/sasl_passwd
else
echo "[$RELAY_HOST]:$RELAY_PORT" > /etc/postfix/sasl_passwd
fi
I dont think any change is needed. i tested with your example and was able to receive the email, i believe the issue was mine as i specified smtp.office365.com when it should have been my-domain-name.mail.protection.outlook.com on port 25. I rolled back to your latest image with the my-domain-name.mail.protection.outlook.com as my SMTP address and confirmed it was working.
Hello, We have several internal systems and want to setup a docker SMTP to relay emails to Office365. Your ENV Variables indicate RELAY_USER and RELAY_PASS arent required. We are using IP based authentication as we dont need a mailbox for each system sending emails...
When i attempt to relay mail to smtp.office365.com on port 587 i get the errors:
im assuming by "SASL authentication failure: All-whitespace username" its passing the username through?
any ideas?