Asterisk + Hylafax mail2fax configuration

Hello everyone, i have been trying to set up a reliable mail2fax service for a couple of months now; using Asterisk as the responsible software for making the actual FAX transmission.

I have tested quite extensively a solution called Asterfax (soft-switch.org/), which have not reached a production status and during my testing have proved to be unreliable and with a hit and miss performance when the actual faxing is made.

I am pressed to come up with a solution, so ive found implementations of Hylafax and Iaxmodem that log into Asterisk and are capable of faxing services and even mail2fax when configured in sync with a MTA.

I found a very complete hylafax+Asterisk howto, and after following it I have a set up that is able to make calls and in theory send faxes:

julianmenendez.es/documen…lafax_iaxmodem

But, i am currently stuck at configuring a MTA to achieve the mail2fax functionality, i have tried with exim and qmail with no success so far. I have been able to set up both MTAs to receive and send normal email messages, but the actual mail2fax configuration eludes me. This is what ive tried based on what i have found online:

Exim, based on example C035 of the config samples found at the main site, i have not found the right way to set up reception in a FAXNUMBER@domain manner:

######################################################################

TRANSPORTS CONFIGURATION

######################################################################

ORDER DOES NOT MATTER

Only one appropriate transport is called for each delivery.

######################################################################

A transport is used only when referenced from a director or a router that

successfully handles an address.

Estas configuracoes sao para habilitar a envio de fax por email

fax:
driver = pipe
user = cpd
command ="/usr/bin/faxmail -d ${local_part}@${extract{1}{.}{$domain}}"
home_directory = /usr/bin

######################################################################

ROUTERS CONFIGURATION

Specifies how remote addresses are handled

######################################################################

ORDER DOES MATTER

A remote address is passed to each in turn until it is accepted.

######################################################################

Estas configuracoes sao para habilitar o envia de fax por email

fax:
driver = domainlist
transport = fax
route_list ="*.fax"

End of Exim configuration file

I am sure that modifying the ${local_part}@${extract{1}{.}{$domain}} parameter sent to the faxmail binary is the key to be able to receve from FAXNUMBER@domain, but i have not found the right syntax.

And with qmailtoaster, hylafax includes a script named mailfax.sh-qmail, which states:

#!/bin/sh

mailfax - email to fax gateway for qmail.

This file should be installed as /local/etc/mailfax, and the

following changes made to the qmail configuration:

Add the following to /var/qmail/control/virtualdomains

.fax:fax

Add the following to /var/qmail/alias/.qmail-fax-default

| /local/etc/mailfax

And after following the instructions, it also doesnt like the FAXNUMBER@domain incoming mail address syntax, i only get “no mailbox here by that name” reply message.

Does anyone here know how to correctly set this up? Ive been with this for quite some time dont know what else to try. Thanks in advance.