HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
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:
http://www.julianmenendez.es/documentos/asterisk_hylafax_iaxmodem
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
Postfix:
http://www.julianmenendez.es/pasarela_email2fax_hylafax_postfix/
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:
http://hylafax.sourceforge.net/howto/clients/relayfax2sendfax
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:
@fax.mrcorp.com.mx mailtofax
Then run "make" to build the virtusertable.db file. Then create a
"mailtofax" alias in /etc/aliases that looks something like this:
mailtofax: "|/usr/local/bin/mailtofax.sh"
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
this:
#!/bin/sh
cat > /tmp/mailtofax.mail.$$
DESTNUM=`grep -m 1 "^To:" /tmp/mailtofax.mail.$$ | sed
's/^To:[^0-9]*\([0-9]*\)@.*/\1/'`
if [ -n "$DESTNUM" ]; then
cat /tmp/mailtofax.mail.$$ | /usr/local/bin/faxmail -d $DESTNUM
fi
exit
Of course, you'll need to make that suit your needs. Make sure to mark
the mailtofax.sh script as executable (chmod a+x
/usr/local/bin/mailtofax.sh).
Lee.
____________________ 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*