Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Support Database.

by blokhead (Monsignor)
on Sep 03, 2002 at 17:50 UTC ( #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
Node Status?
node history
Node Type: note [id://194831]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-10-28 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (260 votes). Check out past polls.

    Notices?