procmail
[Top] [All Lists]

Re: Directing mail to a database

2000-10-02 17:00:13
Mark Irvine <mirvine(_at_)compsoc(_dot_)com> writes:

[...]

Seems simple enough.
I type mkfifo /home/mark/my.fifo

So my procmail reciepe would be like:

:0:
* ^TOprocmail
| /home/mark/my.fifo 

The perl script might look like:
#!/usr/bin/perl -w

open(FIFO, "< /home/mark/my.fifo") or die $!;
while (<FIFO>){
      #sort out table colums and values
      #execute sql to store in database
}
close(FIFO);


Probably a dumb thought and not sure I understand what a fifo is or
does but why not just pipe direct to the perl script leaving out the
fifo stuff?

 :0:
 * ^TOprocmail
 | /home/mark/bin/Message2db.pl

_______________________________________________
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>