Difference between revisions of "Attach fax document to email notification"
(Add Ubuntu 7.04 Feisty distribution specifics for attaching TIF/PDF to e-mail notification message.) |
|||
Line 20: | Line 20: | ||
HylaFAX versions prior to 4.1.1 do not support the FILETYPE option in FaxDispatch, and so the attachments will always be Postscript. Users of HylaFAX versions prior to 4.1.1 (shame on you) may be interested in using the old faxrcvd-mail scripts by Noel Burton-Krahn. They can be found [http://www.hylafax.org/site1/howto/faxrcvd/index.html here]. Note that these WILL NOT WORK as-is on HylaFAX versions 4.1.1 and newer. | HylaFAX versions prior to 4.1.1 do not support the FILETYPE option in FaxDispatch, and so the attachments will always be Postscript. Users of HylaFAX versions prior to 4.1.1 (shame on you) may be interested in using the old faxrcvd-mail scripts by Noel Burton-Krahn. They can be found [http://www.hylafax.org/site1/howto/faxrcvd/index.html here]. Note that these WILL NOT WORK as-is on HylaFAX versions 4.1.1 and newer. | ||
+ | |||
+ | |||
+ | == Distribution Specifics == | ||
+ | |||
+ | === Ubuntu 7.04 Feisty Fawn (HylaFAX 4.3.1) === | ||
+ | |||
+ | Because <code>/var/spool/hylafax/etc/setup.cache</code> will define the following: | ||
+ | |||
+ | BASE64ENCODE='/usr/bin/uuencode' | ||
+ | MIMENCODE='/usr/bin/uuencode | ||
+ | UUENCODE='/usr/bin/uuencode' | ||
+ | |||
+ | and uuencode - GNU sharutils 4.2.1 ''must'' include the output file as an argument, <code>/var/spool/hylafax/etc/FaxDispatch</code> should include the following: | ||
+ | |||
+ | FILETYPE=tif | ||
+ | SENDTO=FaxMaster | ||
+ | BASE64ENCODE='bin/uuencode_it' | ||
+ | |||
+ | (replace <code>tif</code> with <code>pdf</code> if desired) and <code>/var/spool/hylafax/bin/uuencode_it</code> should include the following instead: | ||
+ | |||
+ | #!/bin/sh | ||
+ | uuencode -m $1 /dev/stdout | grep -E -v "^begin|^====$" 2>/dev/null | ||
+ | |||
+ | Note the replacement of the second <code>$1</code> with <code>/dev/stdout</code> from the original. |
Revision as of 11:54, 4 October 2007
By using this procedure, the default email (sent after receiving a fax) will be sent with the fax image attached to it.
Create the file etc/FaxDispatch (usually /var/spool/hylafax/etc/FaxDispatch) so that it contains the following lines:
FILETYPE=tif; SENDTO=FaxMaster;
Substitute pdf or ps for tif as you desire.
Note that because TIFF and PDF are binary file types, metamail, uuencode, or some other encoding program must be installed. In HylaFAX versions prior to 4.2.0 if you do not use metamail's mimencode, also include a line like:
MIMENCODE=bin/uuencode_it;
in your FaxDispatch file where bin/uuencode_it is an executable shell script of the form
#!/bin/sh uuencode -m $1 $1 | grep -E -v "^begin|^====$" 2>/dev/null
HylaFAX 4.2.0 and later natively supports both uuencode and mimencode, which is to say if either the 'uuencode' or 'mimencode' binaries exist, they will be detected and used by HylaFAX to encode the attachment.
HylaFAX versions prior to 4.1.1 do not support the FILETYPE option in FaxDispatch, and so the attachments will always be Postscript. Users of HylaFAX versions prior to 4.1.1 (shame on you) may be interested in using the old faxrcvd-mail scripts by Noel Burton-Krahn. They can be found here. Note that these WILL NOT WORK as-is on HylaFAX versions 4.1.1 and newer.
Distribution Specifics
Ubuntu 7.04 Feisty Fawn (HylaFAX 4.3.1)
Because /var/spool/hylafax/etc/setup.cache
will define the following:
BASE64ENCODE='/usr/bin/uuencode' MIMENCODE='/usr/bin/uuencode UUENCODE='/usr/bin/uuencode'
and uuencode - GNU sharutils 4.2.1 must include the output file as an argument, /var/spool/hylafax/etc/FaxDispatch
should include the following:
FILETYPE=tif SENDTO=FaxMaster BASE64ENCODE='bin/uuencode_it'
(replace tif
with pdf
if desired) and /var/spool/hylafax/bin/uuencode_it
should include the following instead:
#!/bin/sh uuencode -m $1 /dev/stdout | grep -E -v "^begin|^====$" 2>/dev/null
Note the replacement of the second $1
with /dev/stdout
from the original.