From: | Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com> |
---|---|
To: | "Jason C(dot) Leach" <jcl(at)mail(dot)ocis(dot)net> |
Cc: | pgsql-list <pgsql-general(at)hub(dot)org> |
Subject: | Re: [GENERAL] procmail w/ PG. |
Date: | 1999-12-05 20:27:56 |
Message-ID: | 384ACACC.BFA8223@austin.rr.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Jason C. Leach" wrote:
> I'l like procmail to filter out the To, From, Date, Subject, Body and
> complete header of the email. Then either stick it in a DB, or pass
> that info to a Perl script to stick in in the DB.
>
> Anyone know of such a script? Or an example I can work with?
Caveat emptor, as I haven't done it yet, but there are a few procmail
examples of how to filter and pass email to other programs, perl
included, at
http://www.tamucc.edu/~compserv/lman/other/procexamples/index.html
The relevant examples look something like this one, which sends all mail
with 'Digest' in the subject to a mail reformatting program called
formail (see man formail):
:0
* ^Subject:.*Digest
|formail +1 -d -s procmail
This sounds like a task well-suited to perl regular expressions with
DBI/DBD::Pg. I found it quite worthwhile when setting up procmail to
spend some time carefully reviewing the various procmail filter options
(on the man page) that follow the colon. They allow you to chain
filters together and control the flow and exit point of mail through
your filter chains.
Cheers.
Ed Loehr
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Mascari | 1999-12-05 21:59:11 | Re: [GENERAL] null and = |
Previous Message | Bruce Momjian | 1999-12-05 19:28:19 | Re: [GENERAL] memory |