Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Mjohnson on December 20, 2004, 03:47:39 PM
-
I appologize in advance for this question...
How do I change the mail notification address for the various Cron jobs? Currently it is set to the default value of "root". I want to send the notifications to a remote address, "admin@mydomain.com" The root mail account is a dead end on my server, however, I am interested in receiving the notifications.
Thanks in advance.
MJ
-
Click on the email link in server-manager, and change the administrative notices email to whatever you want.
I believe this should be what you're after.
-
No, that does not do the trick...
What I was looking at in the crontab file (/etc/crontab) is the setting Mail=root. I believe this requires a template change to alter. I am just not sure how to go about that.
-
This is untested by me, but I would do something like:
Create a file called "crontab" at:
/etc/e-smith/templates-custom/etc
Create the directory "etc" if it doesn't already exist.
Now add the line:
MAILTO=whatever@domain.com
Then go back out to the console and type:
/sbin/e-smith/expand-template /etc/crontab
Now, check the actual file at /etc/crontab and see how it looks. I'm hope this will overwrite the original "MAILTO" line and not just add another one.
Let me know how this goes.
Tristan
-
This is untested by me, but I would do something like:
Create a file called "crontab" at:
/etc/e-smith/templates-custom/etc
Create the directory "etc" if it doesn't already exist.
Now add the line:
MAILTO=whatever@domain.com
...
Tristan
The above will not work.
What you need to do is copy
etc/e-smith/templates/etc/crontab/00setup
to
etc/e-smith/templates-custom/etc/crontab/00setup
then - edit the file 00setup in the templates-custom directory
then do - sbin/e-smith/expand-template /etc/crontab
I do not know if this will accomplish what you want but it is the correct way to change the setting for 'MAILTO' in the etc/crontab file.
-
ahh. thanks for showing us the proper way to do it bob:)
I completely forgot about fragments...:P Time to go study the docs regarding templating:)
EDIT: its so clear to me now...:-)