Simple example Once logged in, you can run the following command to send email: [server]$ /usr/sbin/sendmail [email protected] Subject: Test Send Mail Hello World control d (this key combination of control key and d will finish the email.)
Type "ps -e | grep sendmail" (without quotes) at the command line. Press the "Enter" key. This command prints a listing that includes all running programs whose name contains the text "sendmail." If sendmail is not running, there will be no results.
Postfix is much more secure than Sendmail, which has weak security architecture. Postfix is designed to overcome the vulnerabilities that are associated with Sendmail. Moreover, a good Postfix configuration secures sensitive data from spam, abuse, and leakage.
You need to install the sendmail
package on your VPS as well as your local machine. Assuming you use some form of Debian linux, you want to run:
sudo apt-get install sendmail
on the VPS.
You need to install a Mail Transport Agent (MTA).
First, let's install postfix
, which provides a /usr/bin/sendmail
:
apt-get update
apt-get install postfix
A configuration screen will pop up, where you need to enter some configuration values. This really depends on your setup. The standard installation is "Internet site", where mail will be sent directly from your server. You can also configure it to relay mail through an external mailserver, which may be preferable if you don't want to deal with SPF, TLS, reverse DNS, etc. But the specifics of the configuration is outside the scope of this question (just Google it, or post a new question if you get stuck).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With