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

Re: Plperlu and sending emails, is it safe?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Philippe Lang <philippe(dot)lang(at)attiksystem(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Plperlu and sending emails, is it safe?
Date: 2004-06-28 09:06:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Philippe Lang wrote:
> Hello,
> I need to send emails from Postgresql triggers.
> I was able to do it with a 'plperlu' function, that calls the 'system'
> perl function, that itself calls the 'mail' shell function.
> Is is safe to do things like this? Is there a possible concurrent access
> that could arise?

Not that I can think of, but "mail" will called as the postgres user, 
which opens up a possible security hole.

> Another solution would be to use cron every 5 minutes, and read the
> content of a table.

This is my preferred solution, but there's plenty of discussion in the 
archives about this.

   Richard Huxton
   Archonet Ltd

In response to

pgsql-general by date

Next:From: Richard HuxtonDate: 2004-06-28 09:11:59
Subject: Re: postgresql perl connectivity
Previous:From: Richard HuxtonDate: 2004-06-28 09:04:29
Subject: Re: Connect to a PostgreSQL table with kylix3

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