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

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



"Carrie Bartkowiak" <ravencarrie@xxxxxxxx> wrote:
> I need to know how the machine determines who the site administrator
> is for a domain.

Site administrators are part of the site-adm group.  See /etc/group.  Also,
you should be able to find the users with their FQDN tacked onto the end in
/usr/local/majordomo/lists/site-adm, though I wouldn't rely on that.
/etc/groups will also tell you what other groups the user is a member of or
you can use the 'groups' program to find out.

> 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.

Good idea, Carrie.  This is something I'd like to do as well.

> I do have a PHP script written up that greps the error log for a

I recommend installing PHP as a CGI if you haven't already to call from the
cron job.

> 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).

I'd be interested in the process you've developed.  Do you plan on parsing
the error logs on the fly and emailing the admins from one call to the
script or are you planning on processing the logs in batches and then having
a script to email the admins?  Or something else?  It's OT at this point,
feel free to email off-list if you'd like.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/