2011/7/15 Dave Page <dp...@pgadmin.org> > On Fri, Jul 15, 2011 at 12:02 AM, Jasmin Dizdarevic > <jasmin.dizdare...@gmail.com> wrote: > > 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. > > You're going to hate me for this, but I thought you'd given up on this > project... > No problem. It's been frustrating because of the licence, but the code was almost written, so I think it's worth to complete this feature.
> > 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? > That sounds great. I don't see any reason to not use it. > It has an MIT license which is compatible. > > Not having SMTP Auth support will be a big issue for many users... > I'm going to check libcurl. > > > 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.dizdare...@gmail.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 <dp...@pgadmin.org> > >>> > >>> On Tue, Jan 4, 2011 at 10:33 PM, Jasmin Dizdarevic > >>> <jasmin.dizdare...@gmail.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: http://pgsnake.blogspot.com > >>> Twitter: @pgsnake > >>> > >>> EnterpriseDB UK: http://www.enterprisedb.com > >>> The Enterprise PostgreSQL Company > >> > > > > > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company >