Score:-1

postfix on local webserver to forward notification mails to customer emails adresses

kh flag

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

HBruijn avatar
in flag
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 avatar
in flag
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.
Sven Kirsten avatar
kh flag
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 ?
HBruijn avatar
in flag
Yes. But typically when a provider blocks port 25 they will offer a mail relay that you can use.
Sven Kirsten avatar
kh flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.