Re: [GENERAL] procmail w/ PG.
От | Ed Loehr |
---|---|
Тема | Re: [GENERAL] procmail w/ PG. |
Дата | |
Msg-id | 384ACACC.BFA8223@austin.rr.com обсуждение исходный текст |
Ответ на | procmail w/ PG. ("Jason C. Leach" <jcl@mail.ocis.net>) |
Список | 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
В списке pgsql-general по дате отправления: