HylaFAX The world's
most advanced open source fax server
Re: [hylafax-users] Hylafax + Asterisk and External MTA mail2fax configuration issue
Diego de Fuentes Ceballos wrote:
Thanks for your reply Lee, here is the correct link:
Okay, but that posting doesn't have anything to do with MTAs or
mail-to-fax stuff. That information comes out in the reader comments
below, and I would be extremely cautious about expecting the reader
comments to be particularly good or accurate.
I also asked that guy about this and he posted a new howto but using
There seems to be some misunderstanding on the author's part that
HylaFAX itself can do what he seems to be regressing to Asterfax and
that email2fax script to accomplish... which takes HylaFAX out of the
loop and is effectively a less-capable manner of doing it.
I think that the best way to accomplish what most people want out of a
mail-to-fax arrangement is to use HylaFAX+'s faxmail (faxmail got an
overhaul that is available in 5.0.3). However, if you have a customized
mail format that you want to use then you may do best to write a faxmail
replacement in shell or something like I've done for RelayFax here:
And actually the only thing that i want is for my MTA to be able to
invoque the faxing utilities when it receives an email addressed to
FAXNUMBER@mydomain and send it to FAXNUMBER; it will be the end users'
responsibility to type correctly the destination.
Okay. What MTA are you using? You'll need to instruct the MTA to send
all mail destined to just numbers to the mail-to-fax processor.
If you were using sendmail I would recommend that you create a
fax-specific hostname for mail-to-fax mails... like
"fax.mrcorp.com.mx". So the fax mails will get sent to
FAXNUMBER@xxxxxxxxxxxxxxxxxx You'll need to work your DNS in order to
accomplish this, but it makes the sendmail configuration much more
simple. Then you just set up a virtual user table (file
"virtusertable", usually in /etc/mail) with the entry:
Then run "make" to build the virtusertable.db file. Then create a
"mailtofax" alias in /etc/aliases that looks something like this:
Then run newaliases. If your sendmail is also running smrsh you may
need to create link /etc/smrsh/mailtofax.sh -->
/usr/local/bin/mailtofax.sh. Then restart sendmail.
Then you need to create the file /usr/local/bin/mailtofax.sh. You can
do *anything* with it at that point, but I would suggest something like
cat > /tmp/mailtofax.mail.$$
DESTNUM=`grep -m 1 "^To:" /tmp/mailtofax.mail.$$ | sed
if [ -n "$DESTNUM" ]; then
cat /tmp/mailtofax.mail.$$ | /usr/local/bin/faxmail -d $DESTNUM
Of course, you'll need to make that suit your needs. Make sure to mark
the mailtofax.sh script as executable (chmod a+x
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*