Running a Rust web server as a service behind a proxy is the sane way to go. Part 1: Using Rust to build a bare-bone web server. Let's assume this part is done because programming is easy. Part 2: Configuring the web server to run in the background as a service . Last part: Further configuring the web server to run behind a proxy so that to keep it safe from the Internet, and to utilize many features which have already been built with the proxy. Running a service is operating-system dependent. Different operating system has a different configuration for running a service. In fact, some operating systems has a couple of ways to run a service. Yet, some may prefer to run a web server in a container like Docker. However, a container requires much more resources than a service. There is no point in building a full-blown web server using Rust especially for a narrow business purpose, even though it can. Just like any web server, a Rust web server...
msmtp requires a minimal setup for sending emails via SMTP compared to sendmail. Here is a configuration for you to send emails from a web host to an external SMTP server. Prior to doing that, you must check whether there is a clear communication channel between your web host and the SMTP server. You can use Telnet . Set up msmtp You are going to set msmtp as an MTA . Hence, you need to remove all other MTAs such as postfix and sendmail: $ sudo apt-get --purge autoremove postfix sendmail Install msmtp and related utilities: $ sudo apt-get install msmtp msmtp-mta mailutils Configure msmtp: $ sudo nano /etc/msmtprc # Set default values for all following accounts. defaults # Use the mail submission port 587 instead of the SMTP port 25. port 587 # Always use TLS. tls on # Set a list of trusted CAs for TLS. The default is to use system settings, but # you can select your own file. tls_trust_file /etc/ssl/certs/ca-certificates.crt # The SMTP server account mx host mail.mx.exam...