1

I have a daemon that executes some commands every two days. When it encounters any error, I want it to notify me. I know that bash can look up the /var/mail/user and tell me if there any new messages in this file. But I never used messages before. I think I have to use the mail command to do that.

However when I try to look up information about the usage of the command, I only read about sending actual emails, not local messages to users. So how would I send a message to myself, so that when I execute mail I'd get You have new mail.

hgiesel
  • 5,430
  • 2
  • 29
  • 56
  • 1
    check here http://hints.macworld.com/article.php?story=20081217161612647 – Tasos Jul 07 '16 at 22:14
  • for local email without using your network without relaying them using a mail provider then check here. you need to setup smtp / mailutils -- http://stackoverflow.com/questions/8260858/how-to-send-email-from-terminal – Tasos Jul 07 '16 at 22:24

1 Answers1

-1

If all you need is to be notified by your automated task, you could use something else than mails. Chatbots, for instance.

I personally use nimrod : https://www.nimrod-messenger.io It's messenger only but other chat systems are planned.

xurei
  • 1,057
  • 8
  • 22