This guide helps you verify that email is sending correctly from your server via command line. It also includes steps to make the test command work for CloudLinux with CageFS.
π¨ Send a Simple Test Email
Run the following command:
echo "Proof that email is being sent from the server just fine" | mail -s "Proof that email is being sent from the server just fine" [email protected]
β Replace
[email protected]
with your actual email address.
π οΈ CloudLinux with CageFS: Add Mail Utility (s-nail)
If you’re using CloudLinux with CageFS, the mail
command might not work by default. You’ll need to add the s-nail
package to CageFS.
- Add
s-nail
to CageFS:
cagefsctl --addrpm s-nail
- Force CageFS to Update for All Users:
cagefsctl --force-update
Once done, the mail
command will work correctly inside jailed environments for your users.