Today, the system needs to use its SMTP server to send emails. Our system architecture is based on appfuse. In fact, it uses spring mail to encapsulate javamail calls, previously, we used a third-party SMTP service.
I started to consider Postfix, good reputation, and had a long time. It was set up and needed support for domain name MX record. We just used it for testing. There was no domain name case test, but it was not done well!
However, Sendmail on our machine can send emails to external devices.
So after modifying the original configuration, javamail can call Sendmail to use SMTP,
Modify as follows:
Mail. DEBUG = false
Mail. Transport. Protocol = SMTP
Mail. Host = localhost
Mail. SMTP. Auth = false
Mail. Username =
Mail. Password =
As you can understand, Sendmail can also be used as an SMTP server, but the verification module is not installed by default.