[CentOS] When no MTA is installed, How to send an email with a cronjob?

Sun Jul 21 09:27:41 UTC 2013
Arun Khan <knura9 at gmail.com>

On Sun, Jul 21, 2013 at 2:12 PM, Indunil Jayasooriya
<indunil75 at gmail.com> wrote:
> Hi,
>
> When no MTA is installed, How to send an email with a cronjob?

Install postfix and configure to accept messages from 'localhost' only.

>
> MAILTO=myemail at example.com

I guess you have a 'real' email id in your setup.

> 15 11 * * * root /root/scripts/backup.sh
>
> Can I send this email via SMTP server?

Some global service providers may accept email from the postfix MTA in
your server.

Alternately, you can configure postfix to relay the message via a
'smart_host' (preferred method).   It will require you to provide a
valid email address + plus password for your postfix (client) to do
authenticate itself and send the outgoing message.

There is ample documentation on the 'Net  to accomplish this.

-- Arun Khan