Re: Help with fax filter

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John Henders
Dátum:  
Címzett: Exim Mailing List
CC: pashdown
Tárgy: Re: Help with fax filter
Why not use a router and a transport instead of a filter. Something like
the following should do what you want, though you may want to use
fax.yourdomain instead of .fax. I'm not sure if sender_address is
available from the domainlist router, so you might need to get it out of
the header. local_part would be the fax number to send to I assume.


Transport:
fax:
        driver =  pipe;
        command = "/usr/local/lib/fax/mailfax ${local_part} ${sender_address}",
        pipe_as_creator,
        return_output
Router:
fax_gate:
        transport = fax,
        driver = domainlist;
        route_list = "fax.yourdomain.com  yourdomain.com" 



I've been looking for a good script to mangle an email into a g3 fax,
have you got one?

On Mar 17, Pete Ashdown <pashdown@???> wrote:
> I'm trying to install a system-wide filter, which will take addresses of
> the form:
>     notify@???

>
> and redirect them to a FAX script.
>
> The following two attempts were mildly successful:
>
> ## Uses header_To: (fails for local mails without it)
> ## Doesn't expand the regex into $1 and $2 for some reason
> if $header_To: matches "([^@]+)@([^.]+)\.fax"
> then
>    pipe "/usr/local/lib/fax/mailfax $1 $2 $sender_address"
> endif

>
> ## Uses $domain, which doesn't work very well at all
> if $domain matches "[^.]+\.fax"
>    pipe "/usr/local/lib/fax/mailfax $original_local_part $domain $sender_address"
> endif

>
> What filter variables expand to show the recipient address, before the
> pipe, without fail?


-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*