-1

I have running a web application on a hosted web server. The web application needs to send out emails to different client email adresses.

The flow would be :

Local WebApplication -> Local Postfix SMTP Server(Port 25) -> Forward Email to Any Remote SMTP Server depending to the Recipient Email Adreee (via STARTTLS Port 587)

How to configure the local Postfix to receive the local Emails from Web Application (Port 25) and then forward to any SMTP Server. I have already retrieved the certificate via letsencrypt and certbot for my internet host.

regards Sven

  • Port `587` is mail submission which is ***reserved for authenticated senders*** and typically requires a valid username + password.- It looks like your mail server will be sending directly to recipients. Routing e-mail via SMTP and MX records will (almost) always require delivery to smtp port 25. If port 25 is blocked for you, your postfix server will need to use an intermediate server, a mail relay, as the first hop towards getting your messages delivered (over port 25). – HBruijn Aug 14 '23 at 10:05
  • 1
    On most Linux distributions installing a postfix package with the default configuration should allow your app to use `/usr/lib/sendmail` or port 25 on `localhost` to send email messages to and to get them delivered. Sending messages with STATTLS does not require a certificate for your postfix server. – HBruijn Aug 14 '23 at 10:13
  • On the hosting server where the Web Application and the postfix daemon runs, the outgoing port 25 is blocked. --- You said, its not possible to configrue the local postfix just to route/forward the received email to the right recipient (remote MX SMTP Server) ? The communication between the local postfix and the remote SMTP Server is only supporting plain SMTP with target Port 25 ? --- For STARTTLS/587 on the target SMTP Server I need user+password authentication ? – Sven Kirsten Aug 14 '23 at 11:21
  • Yes. But typically when a provider blocks port 25 they will offer a mail relay that you can use. – HBruijn Aug 14 '23 at 13:10
  • Okay understand. One question now, how I can configure that the local postfix encrypt all the email messages and send to the right remote MX SMTP Server. This remote MX SMTP Server decrypt the message and assign the email to the right end user account. – Sven Kirsten Aug 17 '23 at 07:11

0 Answers0