Author: Ruth Ivimey-Cook Date: To: User GANBOLD Engineer, Michael Scott Shappe CC: exim-users Subject: Re: [Exim] Question regarding pipe config
Hi,
Please accept my apologies if I'm wrong, but my first thought is that you
should read the exim manual, carefully. You are trying something that is
relatively complex, and with new tools, and exim is a very configurable tool.
> I would like to send incoming message to the script through the pipe.
> The way I'm doing is I'm sending whole message with message headers and
> body to the saveemail.pl script as a command line argument. I'm not quite
Use the CL args to control how savemail does its job. Use standard input of
the perl script for the message itself. If you need headers for the fields in
the mysql db, you might like to put specific headers (e.g. h_subject?) on the
CLA as then you can use exim's processing to extract them.
> > > #system_aliases:
> > > # driver = redirect0
> I tried to use above but it said no such driver redirect0.
The 0 should not be there (look at your exim sources for the example).
> So it means that if I want to handle all messages I should put 'all' in
> first place, is that right?
Don't get trapped into thinking that the name of a router or director is
important to exim, other than to link things together.
> > > zbtamail:
> > > driver = pipe
> > > command = ZBTAMAIL_SAVEEMAIL "$message_headers\n\n$message_body"
> >
> Can you recommend me better way of doing this?
> command = ZBTAMAIL_SAVEEMAIL
will cause the message to be piped to the command. Look at the perl manual for
ways of reading standard input.