On Fri, 17 Apr 1998, Anthon Walters wrote:
> > >/usr/sbin/faxmail | /usr/bin/sendfax -n -d "`/usr/bin/expr \$ADDR\" :
> > >'\(.*\)\.fax$1'`"$SENDER@$PRIMARY_NAME" (also a smail3 example)
>
> What happens when you try to run this, or even test the address using
> the -bt option?
>
> [Anthon Walters] "....Unable to ...router ...returned a non zero value
Was that
fax router: command returned non-zero code xxx
where xxx was some number? That means that the script that was run by
the queryprogram router returned xxx as its exit code, indicating some
kind of error. You need to arrange that the command specified by
command = "/usr/bin/expr ${lc:host} : '.*\.fax$1'"
returns a zero exit code. Oh, hang on. That's not what you want at all.
The queryprogram router has to write information on its standard output
as to how it wants the address routed. All you seem to be wanting to do
is to match domains ending in .fax. Try replacing
# ROUTER
fax:
driver = queryprogram
transport = fax
command = "/usr/bin/expr ${lc:host} : '.*\.fax$1'"
with
# ROUTER
fax:
driver = domainlist
transport = fax
domains = *.fax
route_list = "*"
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***