Re: RFC822 Checker

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Matthew Price <pricem(at)juno(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: RFC822 Checker
Date: 2002-08-30 14:26:40
Message-ID: 20020830142640.GA28639@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Aug 30, 2002 at 14:07:28 +0000,
Matthew Price <pricem(at)juno(dot)com> wrote:
> Howdy,
>
> Does anyone know of an SQL function that will check a string for compliance with the RFC822 mail address spec? I have a script that sends mail from a db (no, I am not a spammer) but I often have mails sitting in my queue because the MTA (correctly) refuses to process some of the bogus things that users enter by mistake.

You might consider storing the unecoded address. If you are using an MTA that
doesn't provide a way to input unencoded addresses (e.g. sendmail), you can
encode the address before passing it to the MTA or adding it into a header
if you need to do that. It isn't even that hard to tack on the person's
name (from somewhere else in your database) or other comment on when putting
the encoded address into a message header.

When collecting input you might ask for confirmation when seeing unusual
addresses. This should cut down on the number of bogus ones that get into
the sysem.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Marco Muratori 2002-08-30 16:38:28 query problem
Previous Message Matthew Price 2002-08-30 14:07:28 RFC822 Checker