Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] E-mail to fax & fax to e-mail
>Lee, could you please be a little more precise, since your page
>(www.deanox.com/HylaFax) is unavailable for several days already.
Yes, yes, I know. It's all my fault. My HylaFAX directory was taken
off-line because the information there was antiquated, providing an old
RPM, for example, and because I haven't kept up the information in it due
to my work on the HylaFAX HOW-TO. That should be up soon. Below is the
excerpt about RelayFax client usage and I've attached the rc files that are
mentioned. You'll have to learn procmail and translate what I did to what
you want... if you don't want to use RelayFax.
>I don't quite get your point about procmail, why should I use it if I have
>the faxmailer?
I don't use the faxmailer, precicely for the reason you're about to mention.
>However I haven't got that far yet, my main concern for now is how to route
>the SMTP traffic between Lotus and qmail without setting up a real DNS with
>MX records. I'm even considering fetchmail usage:)
>Another minor problems on this way is relaying of messages with the address
>field in faxmailer format ("username@phonenumber.fax") - I don't get what I
>should write in the rcpthost file and I don't want to remove it completely
>making an open relay even for my internal use.
This is precicely why I don't use faxmail... I don't like mangling sendmail.
An excerpt from the HOW-TO:
Using RelayFax as a HylaFAX Client
The major goal in this configuration was to reproduce and improve upon the
functionality of a Windows product called RelayFax. I was experiencing
severe trouble with the RelayFax server in Windows. The trouble was the
general type had among Windows-based products: occasional crashes, hangups,
failure to function, interference from other programs, and especially so
when uptime was greater than 24 hours.
The client printing driver/program works well. This client sends e-mail
with a TIFF attachment as the fax. Lines in the body of the e-mail define
the specifics of the recipient and the cover page. The fax server retrieves
this e-mail and faxes the attached TIFF according to the e-mail body
information. I wanted to allow my workstations to continue to use RelayFax
client, but with HylaFAX functioning as the fax server.
Because it was easy to do while I was at it, I enabled a simple
email-to-fax ability. The attachment needs to be HylaFAX compatible (ASCII,
PostScript, TIFF, etc) and the fax-to number should be the only thing in
the subject line. HylaFAX sends the attachment as a fax to the number in
the subject field. No cover page is generated. The body of the e-mail must
contain the line:
FAXPASSWORD: mypassword
where 'mypassword' is the appropriate password defined for your e-mail
return-path username in the faxuserlist file. The rest of the body of the
mail is ignored except for the attachment. I have tested this email-to-fax
gateway with Outlook Express 5, Netscape Messenger 4.73, and Eudora Light.
How To Do It:
Create a new user for out-bound faxes to which RelayFax messages or
fax-intended e-mails will be sent.
Create a folder called 'faxtmp' in this user's $HOME directory.
Place my .procmailrc file, the .faxitrc file, and the faxuserlist file into
this user's $HOME directory. Many thanks go to Steve Glines for his help
with these procmail recipes. Make sure the .procmailrc, .faxitrc, and
faxuserlist have ownership user.user and are not group-writable.
Edit the faxuserlist file to reflect the e-mail addresses of valid fax
users and their password that should be used in the RelayFax client.
Make sure that procmail is your MDA, and if using smrsh, make sure that the
appropriate link is made for procmail. (If using RedHat, 'ln -s
/usr/bin/procmail /etc/smrsh/procmail' should do the trick.)
Install RelayFax client (downloadable at
http://relayfax.deerfield.com/download/) on each client machine and print
to it for faxing.
Notes on un-implemented RelayFax features:
RelayFax uses Microsoft Cover Page Editor to create personalized CPE cover
pages which are sent also as attachments with the e-mail. I'd like to see
this implemented also, but CPE file format knowledge is critical for
CPE-to-PostScript conversion. Does any one know how to find this file
format information?
RelayFax uses the FAXSUBJECT keyword as a way to pass information along to
the RelayFax server rule set. This isn't implemented now, but could be
easily implemented to provide for other sendfax options in .faxitrc Right
now, FAXSUBJECT ends up being the cover page subject line.
RelayFax client allows the attachment of anything to the e-mail in addition
to the fax.tif file and expects that the RelayFax server understands how to
interpret it. As it stands, this will not work with this HylaFAX
configuration. My .procmailrc file only faxes the fax.tif file. I'm not
sure of the results if more than one attachment are present.
Notes on unimplemented HylaFAX features:
fax credits - HylaFAX allows for a "credits" system to be used for
monitoring fax usage. A commercial faxing service could be set up this way,
perhaps.
'sendfax -a' allows for delayed faxing. This isn't implemented.
lots of others... all of these could be implemented, though
That's about it...
Lee Howard faxguy@deanox.com
user1@mydomain.com user1password
user2@mydomain.com user2password
# - .procmailrc file for use with Deerfield's RelayFax as a Windows client
# and HylaFAX as the fax server
# - faxes should be directed to the user where this .procmailrc file is placed
# - faxes may also be sent manually by attaching a tif or ps file to an e-mail
# with the fax number being the subject line
RETURNPATH=`grep -e "return-path" -i | sed "s/^.*<//;s/>//"`
MAILSUBJECT=`grep -e "^subject" -i | sed 's/[Ss]ubject. //g' | sed 's/\ //g'`
PRINTEDFAX=`grep -e PRINTEDFAX | sed -e 's/PRINTEDFAX: //g'`
FAXDESTINATION=`egrep -e '^(FAX|CC)NUMBER' | sed -e 's/^.*NUMBER: \([^,]*\), "\([^"]*\)", "[^"]*"/\2\@\1 ¿/'`
FAXTOCOMPANY=`egrep -e '^(FAX|CC)NUMBER' | sed 's/^[^,]*, "[^"]*", "\([^"]*\)"/\1 ¿/'`
FAXPASSWORD=`grep -e FAXPASSWORD | sed -e 's/FAXPASSWORD: //g'`
FROMNAME=`grep -e FROMNAME | sed -e 's/FROMNAME: //g'`
FROMMAIL=`grep -e FROMLINE | sed -e 's/FROMLINE: //g'`
FROMLINE=$FROMMAIL\ \($FROMNAME\)
NOCOVERPAGE=`grep -e NOCOVERPAGE | sed -e 's/NOCOVERPAGE: //g'`
CONFIRMSEND=`grep -e CONFIRMSEND | sed -e 's/CONFIRMSEND: //g'`
FAXSUBJECT=`grep -e FAXSUBJECT | sed -e 's/FAXSUBJECT: //g'`
COMMENTS=`grep -e COMMENTS | sed -e 's/COMMENTS: //g'`
ATTACHMENTNAME=`grep -e 'Content-Type.*name=' | sed -e 's/^.*name=//g' | sed -e 's/\"//g'`
ATTACHMENTFILENAME=`grep -e '.*filename=' | sed -e 's/^.*filename=//g' | sed -e 's/\"//g'`
METAMAIL_TMPDIR="$HOME/faxtmp"
PASSWDCHECK=`grep -e "$RETURNPATH $FAXPASSWORD" $HOME/faxuserlist`
HOST=`hostname -f`
:0
* ! $PASSWDCHECK ?? ^^$RETURNPATH $FAXPASSWORD^^
* ! ^FROM_DAEMON
* ! ^X-Loop
{
:0
| (formail -r -A"X-Loop: $USER@$HOST" ; \
echo "FAX ERROR: You do not have permission to fax.") | $SENDMAIL -t
:0:faxtmp.lock
/dev/null
}
:0 ic:faxtmp.lock
| rm -f $METAMAIL_TMPDIR/*
:0 ic:faxtmp.lock
| metamail -w -x
:0
* PRINTEDFAX ?? ^^TRUE^^
{ INCLUDERC=.faxitrc }
:0 i:faxtmp.lock
| sendfax -f "$RETURNPATH" -n -d "$MAILSUBJECT" $METAMAIL_TMPDIR/$ATTACHMENTFILENAME
:0
* ! FAXDESTINATION ?? ^^^^
{
FAXTOWHOM=`echo $FAXDESTINATION | sed 's/^\([^¿]*\) ¿.*/\1/'`
FAXTOAT=`echo $FAXTOCOMPANY | sed 's/^\([^¿]*\) ¿.*/\1/'`
TONAME=`echo $FAXTOWHOM | sed 's/^\([^\@]*\)@.*/\1/'`
TONUMBER=`echo $FAXTOWHOM | sed 's/^[^\@]*@\(.*\)/\1/'`
FAXDESTINATION=`echo $FAXDESTINATION | sed 's/^[^¿]* ¿\(.*\)/\1/'`
FAXTOCOMPANY=`echo $FAXTOCOMPANY | sed 's/^[^¿]* ¿\(.*\)/\1/'`
:0
* NOCOVERPAGE ?? ^^TRUE^^
{
:0
* CONFIRMSEND ?? ^^TRUE^^
{
:0 ic:faxtmp.lock
| sendfax -f "$FROMLINE" -R -n -d "$FAXTOWHOM" $METAMAIL_TMPDIR/$ATTACHMENTNAME
:0
{ INCLUDERC=.faxitrc }
}
:0 ic:faxtmp.lock
| sendfax -f "$FROMLINE" -n -d "$FAXTOWHOM" $METAMAIL_TMPDIR/$ATTACHMENTNAME
:0
{ INCLUDERC=.faxitrc }
}
:0
* CONFIRMSEND ?? ^^TRUE^^
{
:0
* ATTACHMENTNAME ?? ^^^^
{
:0 ic:faxtmp.lock
| (faxcover -c "$COMMENTS" -f "$FROMNAME" -n "$TONUMBER" -r "$FAXSUBJECT" -t "$TONAME" -x "$FAXTOAT" | sendfax -n -f "$FROMMAIL" -R -d "$FAXTOWHOM")
:0
{ INCLUDERC=.faxitrc }
}
:0 ic:faxtmp.lock
| sendfax -f "$FROMLINE" -R -r "$FAXSUBJECT" -c "$COMMENTS" -x "$FAXTOAT" -d "$FAXTOWHOM" $METAMAIL_TMPDIR/$ATTACHMENTNAME
:0
{ INCLUDERC=.faxitrc }
}
:0
* ATTACHMENTNAME ?? ^^^^
{
:0 ic:faxtmp.lock
| (faxcover -c "$COMMENTS" -f "$FROMNAME" -n "$TONUMBER" -r "$FAXSUBJECT" -t "$TONAME" -x "$FAXTOAT" | sendfax -n -f "$FROMMAIL" -d "$FAXTOWHOM")
:0
{ INCLUDERC=.faxitrc }
}
:0 ic:faxtmp.lock
| sendfax -f "$FROMLINE" -r "$FAXSUBJECT" -c "$COMMENTS" -x "$FAXTOAT" -d "$FAXTOWHOM" $METAMAIL_TMPDIR/$ATTACHMENTNAME
:0
{ INCLUDERC=.faxitrc }
}
:0 i
/dev/null