I installed monit on an Ubuntu 18.04 server and I would like to configure it to send e-mails to my personal e-mail address. I heard that I can send them via the installed exim. However, it does not work. As I am new to both mail servers and monit, I am not sure how to fix it.

In /etc/monit/monitrc, I added

set mailserver port 25


set alert [email protected]

where instead of [email protected] I use my personal e-mail address.

To test whether it works, I also pasted

check file alerttest with path /.nonexistent
   alert [email protected]

into the file, again with my personal e-mail address instead of [email protected].

Despite having checked documentations etc., I am not sure what I am missing here.

The e-mails should be sent directly from the server and not via e.g. Gmail.

  • 1
    In general: start by ensuring that your mail server works as intended before you start troubleshooting in Monit. So check the exim logs, confirm that you can connect on port 25 , check is you can send an email message for example from the command-line with the mail or mailx command etc.
    – Bob
    Feb 26, 2021 at 14:20
  • Thanks. The issue was indeed that Exim was not sending e-mails.
    – user
    Feb 26, 2021 at 17:29


You must log in to answer this question.

Browse other questions tagged .