-1

The application is running in Docker container. I do not have this problem when running in a clean VM.

2016-10-18 21:26:14,495[nio-8080-exec-4]  [INFO ] [com.xxx.mail.MailSender 102]     - Sending from noreply@172.17.0.1 to xxx@gmail.com with subject Hello World
2016-10-18 21:26:14,517[nio-8080-exec-4]  [ERROR] [com.xxx.mail.MailSender 107]     - 501 5.1.7 Bad sender address syntax

I tried configuring /etc/postfix/main.cf to allow mynetworks to which I added this IP. Did not work.

I am running the app in an Alpine docker container

bianchi
  • 500
  • 2
  • 12

1 Answers1

0

noreply@172.17.0.1 is indeed bad syntax. An address literal ("172.17.0.1") needs to be enclosed in square brackets:

   noreply@[172.17.0.1]
Ralf Hildebrandt
  • 543
  • 2
  • 16