Running Sendmail Service

Running Sendmail Inside a Container

Sendmail is a widely used open-source mail transfer agent for UNIX systems. It supports SMTP, ESMTP, and other mail-transfer protocols for routing messages across the Internet and internal networks.

Sendmail is included in platform application-server builds by default. Whether it can run on a container with only an internal address depends on the hosting provider’s settings. On some platforms, a Public IP must be attached before the service can start.

Check Sendmail Availability

To confirm whether the hosting provider permits Sendmail on containers that have only an internal IP address, use either of the following methods:

  • Send a request through Help > Contact Support in the dashboard.
  • Check the running processes manually through SSH.
Contact Support menu
Contact the hosting provider through the Help menu.

1Connect through SSH Gate

Connect to the platform account and open the required application-server container.

When SSH access has not been configured yet, generate an SSH key pair, add the public key to the dashboard, and establish the SSH Gate connection first.

2Review the process tree

Run the following command inside the application-server shell:

pstree

Look for the sendmail process. When it appears in the process tree, the service is already running and can be used immediately.

Sendmail process in pstree output
The sendmail process confirms that the mail service is active.

When the process is not listed, enable the service using the procedure below.

Enable Sendmail

The simplest way to start Sendmail is to attach a Public IP to the application-server layer.

  1. Open the environment topology wizard during environment creation or through Change environment topology.
  2. Enable the Public IPv4 switch for the application-server layer.
  3. Click Apply to confirm the change.
Enable Public IP for the application server
Attach a Public IP to the application-server layer.

After the external IP is attached, Sendmail starts automatically.

Provider-controlled option: The hosting provider may allow Sendmail to run without a Public IP. Contact its support team to ask whether this can be enabled for the account or container.

Send a Test Message

1Connect to the application server

Open an SSH session to the container where the Sendmail service is running.

2Run the Sendmail command

Use the following command to send a simple test message:

echo "{text}" | sendmail -f {from_address} -v {to_address}
  • {text} — message body, for example Unlimited PaaS.
  • {from_address} — sender address in the mail@example.com format.
  • {to_address} — recipient address in the same email format.
  • -v — displays verbose delivery output in the terminal.
Send a test message with Sendmail
Run the Sendmail command and review its delivery output.

Verify Email Delivery

Open the recipient mailbox and check for the new message. Delivery may take a few minutes.

Test message received in the inbox
The received message confirms that Sendmail is working.
When the message does not appear in the inbox, check the spam folder and review the verbose Sendmail output for delivery errors.

What’s next?