Well...it took a long time, but the feature is done :)
A friend of mine wrote a C implementation of an smtp client and gave it to
me to include it into pgAgent.
It's a very basic smtp client, without authentication support. I think we're
going to include it, if needed.
There is another change in pgAgent. Now it's possible to execute an SQL
statement from a file located on a place, where pgAgent can access it. I've
included this feature, because we need it at work. We can exclude it, if
you're against it.
The second patch is the GUI for pgAdmin - email notification fields.
The mailer.c in pgAgent will need some tweaking because of possible double
pgAgent version has to be 4 now.
Any comments are welcome.
2011/1/5 Jasmin Dizdarevic <jasmin(dot)dizdarevic(at)gmail(dot)com>
> First of all the agents check's if email is configured and writes this to
> the database (pga_jobagent).
> Older agent's won't run, if the schema version has changed. This is nothing
> new: Matching between PGAGENT_VERSION_MAJOR and pgagent.schema_version().
> For the User there are two scenarios:
> 1. Creating/Modifying job
> see screen1.png
> It will check, if the desired agents are configured for email. If "Host
> agent" is empty, it will check every host registered otherwise the selected
> host only.
> This check only applies, when you enable email notification - so there is
> no problem, when not using it.
> 2. The configuration changes after the job has been created with email
> see screen2.png
> In this case the configuratin status for this job will be shown in
> properties box. It's not possible to update the job, until email
> notification is disabled, configured or bound to an host agent, that is
> already configured properly.
> I'm relatively sure, that we will get the authorization, so I'm supposing
> that pgAgent 4 will be with SMTP support.
> 2011/1/5 Dave Page <dpage(at)pgadmin(dot)org>
>> On Tue, Jan 4, 2011 at 10:33 PM, Jasmin Dizdarevic
>> <jasmin(dot)dizdarevic(at)gmail(dot)com> wrote:
>> > Hi Dave, i think we're on the right way to bear this baby ;)
>> Well, that's one way of putting it :-)
>> > I'm waiting for the authorization for jwsmtp now. When I get it, i will
>> > include the files into the source tree of pgAgent.
>> Please ensure he CC's me with his authorisation, as I'll need to keep
>> a record of it.
>> > The UI checks the schema version and disables/enables all related
>> > I've also added an column to pgagent.pga_jobagent, that shows if
>> > on the host instance is configured.
>> > If the user creates or modifies a job where email notification is
>> > he will get a message, that it won't work.
>> How does that work with multiple agents? Don't forget, one of our
>> supported configurations is having agents running on multiple machines
>> against the same database, so we'd need to allow for the case where a
>> user has some agents with SMTP support and some without.
>> Though of course, if we get permission to incorporate the code into
>> pgagent under the appropriate licence, then that is irrelevant as
>> we'll be able to safely enable email in all cases, and rely on the
>> schema version to ensure agents are compatible.
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
In response to
pgadmin-hackers by date
|Next:||From: Ashesh Vashi||Date: 2011-07-15 05:29:08|
|Subject: Re: pgAdmin III commit: Database Designer
(milestone 1 of GSoC 2011)|
|Previous:||From: Guillaume Lelarge||Date: 2011-07-14 21:34:01|
|Subject: pgAdmin III commit: XRC updates, and make style|