Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Support Database.

by blokhead (Monsignor)
on Sep 03, 2002 at 17:50 UTC ( [id://194831]=note: print w/replies, xml ) Need Help??


in reply to Support Database.

I've never used it, but it looks like you can pipe mail to a command using .forward files in postfix. So a very easily manageable solution might be like this:
/home/support/.forward: ----------------------- |/home/support/myscript.pl /home/support/myscript.pl: -------------------------- #!/usr/bin/perl while (<STDIN>) { # parse email headers & body } # add appropriate entries to DB # possibly send a reply giving the ticket number
I think the pipe-to features of postfix looks really promising. Of course, this is not much of a Perl solution, as I've given you a lot of blanks to fill in ;) .. I assume you have had experience with DBI in Perl. If not, there are a lot of good resources around, just search the monastery and you'll come up with a lot. Anyway, this feature of postfix seems like a good way to get the mail to the Perl. Now you just get the data from the Perl to the DB ;)

<tangent> Hey other monks.. A thought just occured to me.. would it be useful to have a mod_perl-ish set of hooks in postfix (or your favorite MTA), so that you can add PerlHandlers here and there for various things -- accepting email, filtering incoming and outgoing, accepting or rejecting relays... Maybe there is something already like this. Just a random thought. </tangent>

Good luck, it sounds like a fun project

blokhead

Replies are listed 'Best First'.
Re: Re: Support Database.
by gav^ (Curate) on Sep 03, 2002 at 18:31 UTC
    You might want to look at Mail::Audit which does a lot of that stuff for you.

    gav^

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://194831]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-24 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found