Rebuild/Fix Mail Dbs/Boxes

Valuehosted

Well-Known Member
Dec 12, 2002
124
0
166
Sweden
what if I wanted it to email root re: the results, how would I redirect it?

Thanks guys for a great how to:

--Tone

ps: just to be on the safe side, anyone have any bad experience doign this?
 

eazistore

Well-Known Member
Nov 7, 2003
69
0
156
Singapore
root email

Originally posted by Valuehosted
what if I wanted it to email root re: the results, how would I redirect it?

Thanks guys for a great how to:

--Tone

ps: just to be on the safe side, anyone have any bad experience doign this?
Hi Valuehosted,

I do not think you need to redirect to any email.
It'll just post to the root email where you have set via WHM.
Example: [email protected]

So far so good and nothing broken yet :)
Any I suppose it'll not do any harm even if you set the cron job wrongly.
 

Sheldon

Well-Known Member
Jun 7, 2004
378
0
166
Canada
yes ok.. but where do we put that line.. in which file.. cuz obviously we cant run this in say our main cpanel account.. as the files are owned by root correct?

Sheldon
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
Originally posted by Sheldon
yes ok.. but where do we put that line.. in which file.. cuz obviously we cant run this in say our main cpanel account.. as the files are owned by root correct?

Sheldon
I assume you mean the line
0 0,12 * * * /scripts/mailperm > /dev/null 2<&1
in which case, see Ramsey's post above.

Just add it after the other cron jobs that are there.
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
Originally posted by Sheldon
ok question:

how would you program a cron to check if a service or program was running and if it wasnt try to start it?

Sheldon
That would involve a backend script to do the checking and restarting, and that script would then be set to run at intervals by a cron job.