Skip site navigation (1) Skip section navigation (2)

Re: Email notification pgAgent

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Jasmin Dizdarevic <jasmin(dot)dizdarevic(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Email notification pgAgent
Date: 2011-07-15 08:22:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
On Fri, Jul 15, 2011 at 12:02 AM, Jasmin Dizdarevic
<jasmin(dot)dizdarevic(at)gmail(dot)com> wrote:
> 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.

You're going to hate me for this, but I thought you'd given up on this

I found out the other day that libcurl has support for SMTP, including
TLS/STARTTLS, and SMTP Auth. Is there any reason that cannot be used?
It has an MIT license which is compatible.

Not having SMTP Auth support will be a big issue for many users...

> 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
> includes (wxWidgets).
> pgAgent version has to be 4 now.
> Any comments are welcome.
> Jasmin
> 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
>> notification
>> 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.
>> Regards,
>> Jasmin
>> 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
>>> > features.
>>> > I've also added an column to pgagent.pga_jobagent, that shows if
>>> > smtp-server
>>> > on the host instance is configured.
>>> > If the user creates or modifies a job where email notification is
>>> > enabled,
>>> > 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:
>>> Twitter: @pgsnake
>>> EnterpriseDB UK:
>>> The Enterprise PostgreSQL Company

Dave Page
Twitter: @pgsnake

EnterpriseDB UK:
The Enterprise PostgreSQL Company

In response to


pgadmin-hackers by date

Next:From: Jasmin DizdarevicDate: 2011-07-15 10:45:01
Subject: Re: Email notification pgAgent
Previous:From: Ashesh VashiDate: 2011-07-15 06:11:25
Subject: Re: pgAdmin III commit: Database Designer (milestone 1 of GSoC 2011)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group