pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RFC822 Checker
3+ messages / 3 participants
[nested] [flat]

* RFC822 Checker
@ 2002-08-30 14:07  Matthew Price <pricem@juno.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Matthew Price @ 2002-08-30 14:07 UTC (permalink / raw)
  To: pgsql-sql

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.

Thanks,
Matthew




________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: RFC822 Checker
@ 2002-08-30 14:26  Bruno Wolff III <bruno@wolff.to>
  parent: Matthew Price <pricem@juno.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruno Wolff III @ 2002-08-30 14:26 UTC (permalink / raw)
  To: Matthew Price <pricem@juno.com>; +Cc: pgsql-sql

On Fri, Aug 30, 2002 at 14:07:28 +0000,
  Matthew Price <pricem@juno.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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: RFC822 Checker
@ 2002-09-03 08:41  Hubert depesz Lubaczewski <depesz@depesz.pl>
  parent: Matthew Price <pricem@juno.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Hubert depesz Lubaczewski @ 2002-09-03 08:41 UTC (permalink / raw)
  To: Matthew Price <pricem@juno.com>; pgsql-sql

On Fri, Aug 30, 2002 at 02:07:28PM +0000, Matthew Price wrote:
> 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 want to check:
ftp://ftp.cpan.org/CPAN/authors/Tom_Christiansen/scripts/ckaddr.gz
since this is in pure perl, making a pl/perl function should be pretty
simple.

depesz

-- 
hubert depesz lubaczewski                          http://www.depesz.pl/
------------------------------------------------------------------------
Mój Boże, spraw abym milczał, dopóki się nie upewnię,  że  naprawdę  mam
coś do powiedzenia.                                      (c) 1998 depesz

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-09-03 08:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-30 14:07 RFC822 Checker Matthew Price <pricem@juno.com>
2002-08-30 14:26 ` Bruno Wolff III <bruno@wolff.to>
2002-09-03 08:41 ` Hubert depesz Lubaczewski <depesz@depesz.pl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox