Re: [Exim] a little help with .forward file.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nico Erfurth
Dátum:  
Címzett: Dale Wilson
CC: 'exim-users@exim.org'
Tárgy: Re: [Exim] a little help with .forward file.
On Fri, 10 Jan 2003, Dale Wilson wrote:

> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
>
> I'm just getting by on a thread. Please could someone tell me how to
> automatically forward an email to a run cgi script.


You can run CGI-scripts from exim, at least not REAL CGI-scripts, they
need a special enviroment to work properly.

> I need to do it from a different account than the default account. I have
> a server running virtual domains I would like an email that comes to
> <mailto:test@domain.com> test@??? to be sent to process a cgi script.
> I can get this to work with by putting /CatchAllAccountName
> ,"|/usr/local/bin/perl /home/ virtual account/public_html/cgi/test.cgi" but
> I need it only to work when I receive mail from test@???.
> I hope this is a little clear.


Use a filter like this one:

# exim filter

if $h_from: contains "test@???"
and $h_to: contains "test@???" then
pipe /home/virtual_account/some_script
deliver realaccount@???
endif

some_script shouldn't be a CGI-script, but a normal-filter script, that is
able to handle pipe input.

But DON'T rely on header-addresses for security things, they can be easily
faked.

ciao