"/ usr / sbin / sendmail /" Not found

Locally, the Rail application works well, but on the VPS server, when I try to send an email with all the correct settings using the Rails application, I get this error in the logs:

sh: 1: /usr/sbin/sendmail: not found 

How to fix it?

+5
source share
2 answers

You need to install the sendmail package on your VPS, as well as on the local machine. Assuming you are using some form of Debian linux, you want to run sudo apt-get install sendmail on VPS.

+6
source

You need to install the Mail Transfer Agent (MTA).

First install postfix , which provides /usr/bin/sendmail :

 apt-get update apt-get install postfix 

A configuration screen will appear where you need to enter some configuration values. It really depends on your setup. The default setting is an “Internet site” where mail will be sent directly from your server. You can also configure it to relay mail through an external mail server, which may be preferable if you do not want to deal with SPF, TLS, reverse DNS, etc. But the specifics of the configuration are beyond the scope of this question (just google, or post a new question if you're stuck).

+2
source

All Articles