<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linuxbuddies.com &#187; email to fax. email to fax gateway</title>
	<atom:link href="http://linuxbuddies.com/tag/email-to-fax-email-to-fax-gateway/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxbuddies.com</link>
	<description>For linux documentations.</description>
	<lastBuildDate>Fri, 11 Sep 2009 10:11:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Email to Fax Gateway!</title>
		<link>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/</link>
		<comments>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 08:49:12 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Hylafax]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Qmail]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[email to fax. email to fax gateway]]></category>
		<category><![CDATA[email2fax]]></category>
		<category><![CDATA[email2fax gateway. pdf fax]]></category>
		<category><![CDATA[jpeg fax]]></category>
		<category><![CDATA[msword fax]]></category>
		<category><![CDATA[postscript fax]]></category>
		<category><![CDATA[tiff fax]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=257</guid>
		<description><![CDATA[This is an awasome feature of hylafax. User can send fax using email applications. Ex: riyesh@23656237.fax
We need to add some simple scipts to activate this feature.By defult hylafax will not decode the attachments.So you need to edit /etc/hylafax/hyla.conf.
specify mime type directory location in /etc/hylafax/hyla.conf
add the following line
MIMEConverters: /var/spool/hylafax/mimetype
Then create the ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-258" title="email2faxthump" src="http://linuxbuddies.com/wp-content/uploads/2009/01/email2faxthump-150x70.jpg" alt="email2faxthump" width="150" height="70" />This is an awasome feature of hylafax. User can send fax using email applications. Ex: riyesh@23656237.fax</p>
<p>We need to add some simple scipts to activate this feature.By defult hylafax will not decode the attachments.So you need to edit /etc/hylafax/hyla.conf.</p>
<p>specify mime type directory location in /etc/hylafax/hyla.conf</p>
<p>add the following line</p>
<blockquote><p>MIMEConverters: /var/spool/hylafax/mimetype</p></blockquote>
<p>Then create the converting scripts under /var/spool/hylafax/mimetype</p>
<blockquote><p>mkdir /var/spool/hylafax/mimetype</p></blockquote>
<p>you need to create followin directories under /var/spool/hylafax/mimetype</p>
<blockquote><p>mkdir application</p>
<p>mkdir image</p>
<p>mkdir text</p></blockquote>
<p>the tree look like this</p>
<blockquote><p>/var/spool/hylafax/mimetype/<br />
/var/spool/hylafax/mimetype/application/pdf<br />
/var/spool/hylafax/mimetype/application/ps<br />
/var/spool/hylafax/mimetype/image/tiff</p>
<p>/var/spool/hylafax/mimetype/text/html</p>
<p><span id="more-257"></span></p></blockquote>
<p><strong>For msword type of files </strong>create msword under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch msword</p>
<p>chmod +x  msword</p>
<p>vi msword</p></blockquote>
<p>add the following lines in msword script</p>
<blockquote><p>#!/bin/bash<br />
antiword $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>For PDF type of files</strong> create pdf under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch pdf</p>
<p>chmod +x pdf</p>
<p>vi pdf</p></blockquote>
<p>add the following lines in pdf script</p>
<blockquote><p>#!/bin/sh<br />
#/application/pdf<br />
# convert PDF attachment to Postscript for HylaFAX to send<br />
pdf2ps $1 -<br />
# if you want to send multipage pdf attachments it is better to use &#8220;pdftops&#8221;<br />
# use the line below instead of &#8220;pdf2ps $1 -&#8221;<br />
# /usr/bin/pdftops $1 -</p>
<p><!--more--><strong><br />
</strong></p></blockquote>
<p><strong>For postscript type of files</strong> create postscript under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch postscript</p>
<p>chmod +x postscript</p>
<p>vi postscript</p></blockquote>
<p>add the following lines in postscript script</p>
<blockquote><p>#!/bin/sh<br />
#/application/pdf<br />
# convert PDF attachment to Postscript for HylaFAX to send<br />
pdf2ps $1 -<br />
# if you want to send multipage pdf attachments it is better to use &#8220;pdftops&#8221;<br />
# use the line below instead of &#8220;pdf2ps $1 -&#8221;<br />
# /usr/bin/pdftops $1 -<br />
mail:/var/spool/hylafax/mimetype/application #<br />
mail:/var/spool/hylafax/mimetype/application # cat postscript<br />
#!/bin/sh<br />
#/application/ps<br />
# convert PS attachment to Postscript for HylaFAX to send<br />
echo $1</p></blockquote>
<p><!--more--><strong>For PS attachment files </strong>create ps under /var/spool/hylafax/mimetype/application</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch postscript</p>
<p>chmod +x postscript</p>
<p>vi postscript</p></blockquote>
<p>add the following lines in ps script</p>
<blockquote><p>#!/bin/sh<br />
#/application/ps<br />
# convert PS attachment to Postscript for HylaFAX to send<br />
echo $1</p></blockquote>
<p><!--more--><strong>For rtf attachement files</strong> create rtf under /var/spool/hylafax/mimetype/application</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch rtf</p>
<p>chmod +x rtf</p>
<p>vi rtf</p></blockquote>
<p>add the following lines in rtf</p>
<blockquote><p>#!/bin/sh<br />
#/application/rtf<br />
# convert RTF attachment to Postscript for HylaFAX to send<br />
/usr/bin/unrtf &#8211;html $1 | /usr/bin/html2ps</p></blockquote>
<p><!--more--><strong>For jpeg attachment files </strong>create jpeg under  /var/spool/hylafax/mimetype/image</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/image</p>
<p>touch image</p>
<p>chmod +x image</p>
<p>vi image</p></blockquote>
<p>add the following lines in jpeg</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/jpeg2ps  $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>For tiff attachment files </strong>create tiff under /var/spool/hylafax/mimetype/image</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/image</p>
<p>touch tiff</p>
<p>chmod +x tiff<br />
vi tiff</p></blockquote>
<p>Then add the following lines</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/jpeg2ps  $1<br />
exit<br />
mail:/var/spool/hylafax/mimetype/image # cat tiff<br />
#!/bin/sh<br />
#/image/tif<br />
# convert TIF attachment to Postscript for HylaFAX to send<br />
/usr/bin/tiff2ps $1<br />
# if you want to send multipage tiff images, than you have to add the option &#8220;-a&#8221;<br />
# for example:<br />
#/usr/bin/tiff2ps -a $1</p></blockquote>
<p><!--more--><strong>For HTML type  files</strong> create html under /var/spool/hylafax/mimetype/text</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/text</p>
<p>touch html</p>
<p>chmod +x html<br />
vi html</p></blockquote>
<p>then add the following lines.</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/html2ps   $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>Integrating with MTA&#8217;s </strong></p>
<blockquote><p><strong><br />
</strong></p></blockquote>
<blockquote><p>cd /usr/src/hylafax-(source package)</p>
<p>cd faxmail</p></blockquote>
<p>there you can see the files</p>
<blockquote><p>mailfax.sh-sendmail</p>
<p>mailfax.sh-postfix</p>
<p>mailfax.sh-qmail</p>
<p>mailfax.sh-smail</p></blockquote>
<p>do as per the files says.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
