Re: Need psql send email

From: Martin French <Martin(dot)French(at)romaxtech(dot)com>
To: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
Cc: depesz(at)depesz(dot)com, pavithra <pavithra(dot)ibt(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org
Subject: Re: Need psql send email
Date: 2012-09-20 13:19:22
Message-ID: OFBCE0A3CE.9820A18D-ON80257A7F.0047C6C1-80257A7F.00492ED7@romaxtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The 1st one seems OK in a scary-from-a-security-standpoint kind of way.

Agree, it needs to be weighed up and assessed from a security stand point
I guess.

> The 2nd, not so much. See
> http://stackoverflow.com/questions/12002662/psql-trigger-send-email
>
> Imagine if the DNS goes wonky. Do you want all your backends tied up in
> DNS lookups? Or timing-out TCP connections?

Agree 100%, which is why I noted: "the server is properly configured on
the network"... I suppose you could always provide an IP address as the
mail host. This function is only a "Quick Knock Together" job, that works
readily enough.

>

IMHO There's always an inherent risk with any form of sending mail from an
RDBMS, whether it be abuse or otherwise, however; it's one of those
situations where "needs must", and more often than not must be done
quickly.

I would guess that having SMTP built into the DB engine itself would be no
less susceptible to abuse or problems than any other method (For example
UTL_SMTP in Oracle, which I've had hang before due to issues with SMTP
servers).

I guess it's one of those where you just have to weigh up the options and
choose the best one for your situation/application.

Cheers

Martin
=============================================

Romax Technology Limited
Rutherford House
Nottingham Science & Technology Park
Nottingham,
NG7 2PZ
England

Telephone numbers:
+44 (0)115 951 88 00 (main)

For other office locations see:
http://www.romaxtech.com/Contact
=================================
===============
E-mail: info(at)romaxtech(dot)com
Website: www.romaxtech.com
=================================

================
Confidentiality Statement
This transmission is for the addressee only and contains information that
is confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf
of the addressee
you may not copy or use it, or disclose it to anyone else.
If you have received this transmission in error please delete from your
system and contact the sender. Thank you for your cooperation.
=================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2012-09-20 13:35:54 Re: Need psql send email
Previous Message Edson Richter 2012-09-20 13:09:17 Re: Slow counting still true?