[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Sending email to site admins only?



On 9/5/01 at 5:19 AM Carrie Bartkowiak wrote:
|There's been a lot of talk about sending mail to *all* users on the 
|server; this is not what I want to do.
|I need to know how the machine determines who the site administrator 
|is for a domain.
|What I'm wanting to do is have the server go through the logs once a 
|day and email all of the error lines for that domain to the domain's 
|site administrator. I've got some site admins who don't bother to 
|look at their copy of the logs, and I'm getting pretty fed up with 
|having constant entries being logged because an image can't be found. 
|It's really filling up the logs before they get chopped up each 
|night. I want to make the site admins aware of this noise they're 
|throwing into the logs so they can fix it. This would be a cron job, 
|of course.
|
|I do have a PHP script written up that greps the error log for a 
|certain domain and returns it to a browser, but sending email to the 
|site admin is more of an 'in your face' solution that they can't 
|ignore (or just neglect to check).
|
|Any ideas?
=============

More of a place to start, than a solution: look in /etc/group at the group site-adm, that contains all the administrators on the RaQ (I'm going by what I see on my RaQ3).  Then look at the site1...n groups, they contain the users of each site.

If may be possible, with some good scripting, to cross-reference those sets of groups to get the site admin for each site.  Then it is a matter of cross-referencing site1 to www.this-site.com, and site2 to www.that-site.com, etc.  

Pull it all together and you could actually wind up with theadmin@xxxxxxxxxxxxx

Good luck.