summaryrefslogtreecommitdiff
path: root/doc/forum/cron_email.mdwn
blob: 19f1bb4db7acbee9707eb48c1664870b9a52d58b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Hello,

In my institut, I want to manage a few of my computers with propellor (the cluster will come ;)
So I would like to add a MAILTO to cron.

The best would be to configure exim4 to redirect all root email to my personnal mbox but for now I just want to do it for cron

So I created a property for this.

-- redirect all root email to an email
redirectCronEmail :: String -> Property NoInfo
redirectCronEmail email = "/etc/default/cron" `File.containsLine` ("MAILTO=" ++ email)
                    `requires` Apt.serviceInstalledRunning "cron"
                    `onChange` Service.restarted "cron"


Would you be so kind to add an equivalent into Cron. (PS I do not know if my property is properly written)

something like

Cron.mailTO "toto@titi.org"

or maybe this is not the right way to solve my problem.

Cheers

Frederic