2

I have a Debian server and have monit installed and running. I use the following settings for alert mails:

set mailserver localhost   # primary mailserver
set mail-format { from: monit@abc.test }
set alert admin@abc.test

I've started monit manually, and that resulted in local mails, to root@localhost. I want to receive mails via my personal mail address. I have postfix installed, and other applications (like Wordpress) can send out mails.

Why doesn't that work, and how can I get it working?

@Zoredache suggests to forward the mail to root@localhost to my own address. That sounds like a good solution. Now I'm wondering how I can get that working.

SPRBRN
  • 8,149

2 Answers2

1

To create an alias under most mail servers, and I believe postfix, just update the system alias file /etc/aliases. It almost certainly already exists, so you just have to go in and add or update a line.

root: me@example.com
suspectus
  • 5,008
Zoredache
  • 20,438
0

We need to set mailserver as localhost in /etc/monit/monitrc file

set mailserver localhost

Then restart monit service /etc/init.d/monit restart