We use Mail::Sender which is independent of its location. But there are
plenty of others. If the program is missing then the class object is not
created.
This would be a useful addition.
Graham
-----Original Message-----
From: lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Horms
Sent: 03 August 2005 06:44
To: LinuxVirtualServer.org users mailing list.
Subject: Re: Email alerts for ldirectord (patch in URL)
On Tue, Aug 02, 2005 at 05:53:16PM -0400, Reid Sutherland wrote:
> On 8/2/05, Peter Mueller <pmueller@xxxxxxxxxxxx> wrote:
> > > Nice patch, but you're not even checking to see if
> > > /usr/lib/sendmail exists or if it even ran without errors.
> > > Ideally you would make all these variables, configuration
> > > variables as well. I'd have to say this patch is incomplete,
> > > but it's a good idea.
> >
> > This is true, but it works on RedHat and Suse. I'll be happy to
change my
> > patch for your distro(s) if you have any patch updates..
> >
> > Ldirectord needs email alert functionality. I'm sure there's a
better way of
> > doing it - isn't there always with Perl - but this does work.
>
> I personally would investigate getting those variables into the config
> file first. And then check the return value of sendmail. You could
> optionally use module as well, such as Mail::Sendmail.
Thanks for the patch, here are few comments.
Things I'd like to see fixed before adding to the tree:
1. The alerts need to be able to be turned on or off in the
configuration file. Perhaps a simple configuration varibale, that can
be global and per-virtual, and defaults to off. alertmail might not
be such a bad name
2. The addresses also need to be configurable, again on a global or
per-virtual basis. alertmailfailaddress, alertmailsuccessaddress
might not be such bad names, though they are rather long.
I am also concerend about using /usr/lib/sendmail directly,
and this is probably the main reason I haven't added this feature
in the past. I'm happy to live with it for now, but its certainly
an area for improvement in the future.
--
Horms
|