procmail
[Top] [All Lists]

Re: Is this feasible?

2000-12-29 16:13:15
Sounds like it would work (untested, of course!).

:0
* ^Subject:\/.*
| echo $MATCH | match_subj.pl


match_subj.pl:

use DBI;

$subject = join("",<STDIN>);

$dbh = DBI->connect("DBI:MySql:emails");
$query = DBI->prepare("select * from subjects where subject='$subject'");
$query->execute();

while (@data = $query->fetch_array())
{
        ...  # ah, I don't feel like finishing it
}



On Fri, 29 Dec 2000, Joe Hagerty wrote:

I want to have procmail monitor one acocunt on my system.  An account 
created for this purpose.  When an email comes in, grab the subject 
line and pass it to a perl script that will look up the subject in 
a mysql database.  The perl script will then create an outbound email 
with the db results.

It seems straight forward enough for me, just wanting a second opinion.

Joe

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>