<?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>songshu.org &#187; avantfax</title>
	<atom:link href="http://www.songshu.org/index.php/category/avantfax/feed" rel="self" type="application/rss+xml" />
	<link>http://www.songshu.org</link>
	<description>Just another collection of nuts</description>
	<lastBuildDate>Mon, 22 Mar 2010 13:16:36 +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>avantfax_install_script</title>
		<link>http://www.songshu.org/index.php/avantfax_install_script</link>
		<comments>http://www.songshu.org/index.php/avantfax_install_script#comments</comments>
		<pubDate>Sat, 21 Feb 2009 11:25:10 +0000</pubDate>
		<dc:creator>randall</dc:creator>
				<category><![CDATA[Debian Lenny]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[avantfax]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hylafax]]></category>
		<category><![CDATA[install script]]></category>
		<category><![CDATA[lenny]]></category>

		<guid isPermaLink="false">http://www.songshu.org/?p=1276</guid>
		<description><![CDATA[&#60;div id=“dw”&#62; Debian Avantfax install script improvement WORK IN PROGRESS!!!!! Avantfax works really well on Debian but it is not officially supported by Avantfax so the install script is lacking, i would like to improve that and any feedback would be appreciated. The first time i installed Avantfax on Debian Etch there was only an install script for Red Hat and SuSe so everything needed to be done manually, i made some notes at the time here http://www.songshu.org/index.php/avantfax-on-debian Since AvantFAX 3.1.0 there is a debian install script available that comes a long way but is not yet perfect and it requires some extra manual steps and tinkering, also an install script to set up mail2fax is missing for Debian. This is an attempt to improve the following Debian scripts that can be found in AvantFAX 3.1.6 http://www.songshu.org/index.php/old-avantfax-316-debian-install-script http://www.songshu.org/index.php/old-avantfax-316-debian-prefs http://www.songshu.org/index.php/old-avantfax-316-email2fax http://www.songshu.org/index.php/old-avantfax-316-setup-postfix debian install script This script comes a long way accept that the apache virtual host is not set up correctly. and the specified directory /etc/apache2/logs does not exist so apache will refuse to start. The following section needs improvement. cat &#38;gt;&#38;gt; /etc/apache2/sites-enabled/000-default &#38;lt;&#38;lt; EOF &#38;lt;VirtualHost *:80&#38;gt; DocumentRoot $INSTDIR ServerName avantfax ErrorLog logs/avantfax-error_log CustomLog logs/avantfax-access_log common &#38;lt;/VirtualHost&#38;gt; EOF What we see [...]]]></description>
			<content:encoded><![CDATA[<p><!-- begin Dokuwiki generated code--></p>
<div class="dokuwiki">
<p>&lt;div id=“dw”&gt;</p>
<h2><a name="debian_avantfax_install_script_improvement_work_in_progress" id="debian_avantfax_install_script_improvement_work_in_progress">Debian Avantfax install script improvement WORK IN PROGRESS!!!!!</a></h2>
<div class="level2">
<p>Avantfax works really well on Debian but it is not officially supported by Avantfax so the install script is lacking, i would like to improve that and any feedback would be appreciated.
</p>
<p>
The first time i installed Avantfax on Debian Etch there was only an install script for Red Hat and SuSe so everything needed to be done manually, i made some notes at the time here <a href="http://www.songshu.org/index.php/avantfax-on-debian" class="urlextern" title="http://www.songshu.org/index.php/avantfax-on-debian"  rel="nofollow">http://www.songshu.org/index.php/avantfax-on-debian</a>
</p>
<p>
Since AvantFAX 3.1.0 there is a debian install script available that comes a long way but is not yet perfect and it requires some extra manual steps and tinkering, also an install script to set up mail2fax is missing for Debian.
</p>
<p>
This is an attempt to improve the following Debian scripts that can be found in AvantFAX 3.1.6</p>
<ul>
<li class="level1">
<div class="li"> <a href="http://www.songshu.org/index.php/old-avantfax-316-debian-install-script" class="urlextern" title="http://www.songshu.org/index.php/old-avantfax-316-debian-install-script"  rel="nofollow">http://www.songshu.org/index.php/old-avantfax-316-debian-install-script</a></div>
</li>
<li class="level1">
<div class="li"> <a href="http://www.songshu.org/index.php/old-avantfax-316-debian-prefs" class="urlextern" title="http://www.songshu.org/index.php/old-avantfax-316-debian-prefs"  rel="nofollow">http://www.songshu.org/index.php/old-avantfax-316-debian-prefs</a></div>
</li>
<li class="level1">
<div class="li"> <a href="http://www.songshu.org/index.php/old-avantfax-316-email2fax" class="urlextern" title="http://www.songshu.org/index.php/old-avantfax-316-email2fax"  rel="nofollow">http://www.songshu.org/index.php/old-avantfax-316-email2fax</a></div>
</li>
<li class="level1">
<div class="li"> <a href="http://www.songshu.org/index.php/old-avantfax-316-setup-postfix" class="urlextern" title="http://www.songshu.org/index.php/old-avantfax-316-setup-postfix"  rel="nofollow">http://www.songshu.org/index.php/old-avantfax-316-setup-postfix</a></div>
</li>
</ul>
</div>
<h3><a name="debian_install_script" id="debian_install_script">debian install script</a></h3>
<div class="level3">
<p>This script comes a long way accept that the apache virtual host is not set up correctly. and the specified directory /etc/apache2/logs does not exist so apache will refuse to start.
</p>
<p>
The following section needs improvement.</p>
<pre class="code">cat &amp;gt;&amp;gt; /etc/apache2/sites-enabled/000-default &amp;lt;&amp;lt; EOF

&amp;lt;VirtualHost *:80&amp;gt;
    DocumentRoot $INSTDIR
    ServerName avantfax
    ErrorLog logs/avantfax-error_log
    CustomLog logs/avantfax-access_log common
&amp;lt;/VirtualHost&amp;gt;
EOF</pre>
<p>
What we see here is that the virtualhost is added below in the 000-default file, this does not work since the default will not be changed and a new virtual host is not added.<br />
Also we could move the avantfax logs to the debian default log section /var/logs/<br />
The suggestion is to have it add a separate new virtual host for the chosen domain name as specified in the debian-prefs.txt.</p>
<pre class="code">cat &amp;gt;&amp;gt; /etc/apache2/sites-available/$FAXDOMAIN &amp;lt;&amp;lt; EOF

&amp;lt;VirtualHost *:80&amp;gt;
    DocumentRoot $INSTDIR
    ServerName $FAXDOMAIN
    ErrorLog /var/log/avantfax-error_log
    CustomLog /var/log/avantfax-access_log common
&amp;lt;/VirtualHost&amp;gt;
EOF</pre>
<p>
After the new virtual host file is added to the sites-available we can add the following to have it added to the apache sites-enabled section.
</p>
<pre class="code">a2ensite $FAXDOMAIN
/etc/init.d/apache2 reload
a2dissite 000-default
/etc/init.d/apache2 reload</pre>
</div>
<h3><a name="debian-prefs" id="debian-prefs">debian-prefs</a></h3>
<div class="level3">
</div>
<h3><a name="email2fax" id="email2fax">email2fax</a></h3>
<div class="level3">
</div>
<h3><a name="setup-postfix" id="setup-postfix">setup-postfix</a></h3>
<div class="level3">
<p>This script is completely non-debian so i suggest to make ad a new debian-setup-postfix.sh script
</p>
<p>
The following section can be removed</p>
<pre class="code"># INSTALL REQUIRED APPS IF NOT ALREADY INSTALLED

echo “Installing required packages”

yast –install postfix</pre>
<p>
It mentions yast and that should be replaced with apt-get but AvantFax depends on a functioning hylafax and the installation of hylafax in its turn depends on an installed MTA so it will default to install exim4 if no other MTA is present, using this scripts means you want to use postfix as MTA so this should already be installed before Hylafax.
</p>
<p>
The following section is ment to stop postfix and alter the master.cf file
</p>
<pre class="code"># CONFIGURE POSTFIX

/sbin/service postfix stop

echo “Configuring Email to FAX for domain ${FAXDOMAIN}”

cat &amp;gt;&amp;gt; /etc/postfix/master.cf &amp;lt;&amp;lt; EOF
fax unix - n n - 1 pipe
flags= user=$FAXMAILUSER argv=/usr/bin/faxmail -d -n -NT ${user}

EOF</pre>
<p>Debian uses init so this section should read as follows</p>
<pre class="code"># CONFIGURE POSTFIX
/etc/init.d/postfix stop

echo “Configuring Email to FAX for domain ${FAXDOMAIN}”

cat &amp;gt;&amp;gt; /etc/postfix/master.cf &amp;lt;&amp;lt; EOF
fax unix - n n - 1 pipe
flags= user=$FAXMAILUSER argv=/usr/bin/faxmail -d -n -NT ${user}

EOF</pre>
<p>
Faxmail will start complaining it can not locate the fonts so we need to specify the ghostscript font directory to Hylafax</p>
<pre class="code">cat &amp;gt;&amp;gt; /etc/hylafax/hyla.conf &amp;lt;&amp;lt; EOF
FontMap: /usr/share/ghostscript/8.62/lib/
EOF</pre>
<p>The following section at the end of this script will start postfix after having it stopped at the beginning of the configuration, again we use init.</p>
<pre class="code">/sbin/chkconfig postfix on
/sbin/service postfix start</pre>
<p>
so we replace this with</p>
<pre class="code">/etc/init.d/postfix start</pre>
<p>&lt;/div&gt;
</p>
</div>
</div>
<p><!-- end Dokuwiki generated code--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.songshu.org/index.php/avantfax_install_script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>avantfax on debian</title>
		<link>http://www.songshu.org/index.php/avantfax-on-debian</link>
		<comments>http://www.songshu.org/index.php/avantfax-on-debian#comments</comments>
		<pubDate>Sun, 15 Feb 2009 12:50:33 +0000</pubDate>
		<dc:creator>randall</dc:creator>
				<category><![CDATA[Debian Etch]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[all posts]]></category>
		<category><![CDATA[avantfax]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[hylafax]]></category>
		<category><![CDATA[vserver]]></category>

		<guid isPermaLink="false">http://www.songshu.org/?p=518</guid>
		<description><![CDATA[&#60;div id=“dw”&#62; fax.cipar.net (192.168.1.10) The hylafax server receives and sends faxes and is accessible via Avantfax on http://192.168.1.10 THE AVANTFAX PART OF THIS THIS PAGE IS OUTDATEd by the avantfax debian.sh script which does basically all the avantfax install below but i keep this page for reference and posterity installation newvserver --vsroot /VSERVERS --hostname fax --domain cipar.net --ip 192.168.1.10/24 --dist etch --mirror http://192.168.1.12:3142/debian.apt-get.eu/debian --interface dummy0 # cd /usr/local/sbin # ./set-context.sh fax vserver fax start vserver fax enter locale-gen # nano /etc/apt/sources.list deb http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib deb-src http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib deb http://192.168.1.12:3142/debian.apt-get.eu/debian/ etch main contrib non-free # apt-get update HylaFAX http://manpages.songshu.org/manpages/lenny/en/man5/hylafax-server.5.html http://www.howtoforge.com/build-a-hylafax-server-with-avantfax-on-debian-etch http://www.lucasmanual.com/mywiki/FaxServer http://www.avantfax.com/install.php # apt-get install postfix chhose No configuration # nano /etc/aliases and add the following root: randall@smydomain # newaliases # apt-get install hylafax-server # exit # cp -a /dev/ttyS0 /VSERVERS/fax/dev/ttyS0 # cp -aR /dev/null /VSERVERS/fax/var/spool/hylafax/dev # vserver fax enter # faxsetup enter for the defaults until the country code # Country code [1]? 31 # Area code [415]? 10 # Phone number of fax modem [+1.999.555.1212]? +31.10.1234567 # Local identification string (for TSI/CIG) [&#34;NothingSetup&#34;]? fax.cipar.net # Long distance dialing prefix [1]? 0 # International dialing prefix [011]? 00 # Protection mode for received facsimile [0600]? 0644 [...]]]></description>
			<content:encoded><![CDATA[<p><!-- begin Dokuwiki generated code--></p>
<div class="dokuwiki">
<p>&lt;div id=“dw”&gt;</p>
<h1><a name="fax.cipar.net_192.168.1.10" id="fax.cipar.net_192.168.1.10">fax.cipar.net (192.168.1.10)</a></h1>
<div class="level1">
<p>The hylafax server receives and sends faxes and is accessible via Avantfax on <a href="http://192.168.1.10" class="urlextern" title="http://192.168.1.10"  rel="nofollow">http://192.168.1.10</a>
</p>
</div>
<h3><a name="the_avantfax_part_of_this_this_page_is_outdated_by_the_avantfax_debian.sh_script_which_does_basically_all_the_avantfax_install_below_but_i_keep_this_page_for_reference_and_posterity" id="the_avantfax_part_of_this_this_page_is_outdated_by_the_avantfax_debian.sh_script_which_does_basically_all_the_avantfax_install_below_but_i_keep_this_page_for_reference_and_posterity">THE AVANTFAX PART OF THIS THIS PAGE IS OUTDATEd by the avantfax debian.sh script which does basically all the avantfax install below but i keep this page for reference and posterity</a></h3>
<div class="level3">
</div>
<h3><a name="installation" id="installation">installation</a></h3>
<div class="level3">
<pre class="code">newvserver --vsroot /VSERVERS --hostname fax --domain cipar.net --ip 192.168.1.10/24 --dist etch --mirror http://192.168.1.12:3142/debian.apt-get.eu/debian --interface dummy0</pre>
<pre class="code"># cd /usr/local/sbin
# ./set-context.sh fax</pre>
<pre class="code">vserver fax start
vserver fax enter
locale-gen</pre>
<pre class="code"># nano /etc/apt/sources.list</pre>
<pre class="code">deb http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib
deb-src http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib
deb http://192.168.1.12:3142/debian.apt-get.eu/debian/ etch main contrib non-free</pre>
<pre class="code"># apt-get update
</pre>
</div>
<h3><a name="hylafax" id="hylafax">HylaFAX</a></h3>
<div class="level3">
<p><a href="http://manpages.songshu.org/manpages/lenny/en/man5/hylafax-server.5.html" class="urlextern" title="http://manpages.songshu.org/manpages/lenny/en/man5/hylafax-server.5.html"  rel="nofollow">http://manpages.songshu.org/manpages/lenny/en/man5/hylafax-server.5.html</a>
</p>
<p>
<a href="http://www.howtoforge.com/build-a-hylafax-server-with-avantfax-on-debian-etch" class="urlextern" title="http://www.howtoforge.com/build-a-hylafax-server-with-avantfax-on-debian-etch"  rel="nofollow">http://www.howtoforge.com/build-a-hylafax-server-with-avantfax-on-debian-etch</a><br />
<a href="http://www.lucasmanual.com/mywiki/FaxServer" class="urlextern" title="http://www.lucasmanual.com/mywiki/FaxServer"  rel="nofollow">http://www.lucasmanual.com/mywiki/FaxServer</a><br />
<a href="http://www.avantfax.com/install.php" class="urlextern" title="http://www.avantfax.com/install.php"  rel="nofollow">http://www.avantfax.com/install.php</a></p>
<pre class="code"># apt-get install postfix</pre>
<pre class="code">chhose No configuration</pre>
<pre class="code"># nano /etc/aliases</pre>
<p>and add the following</p>
<pre class="code">root:   randall@smydomain</pre>
<pre class="code"># newaliases</pre>
<pre class="code"># apt-get install hylafax-server</pre>
<pre class="code"># exit
# cp -a /dev/ttyS0 /VSERVERS/fax/dev/ttyS0
# cp -aR /dev/null /VSERVERS/fax/var/spool/hylafax/dev
# vserver fax enter</pre>
<pre class="code"># faxsetup
enter for the defaults until the country code</pre>
<pre class="code"># Country code [1]? 31
# Area code [415]? 10
# Phone number of fax modem [+1.999.555.1212]? +31.10.1234567
# Local identification string (for TSI/CIG) [&quot;NothingSetup&quot;]? fax.cipar.net
# Long distance dialing prefix [1]? 0
# International dialing prefix [011]? 00
# Protection mode for received facsimile [0600]? 0644
# Protection mode for session logs [0600]? 0644
# Protection mode for ttyS0 [0600]? 0666</pre>
<p>
Allow users from our subnet access to the fax service:</p>
<pre class="code"># nano /etc/hylafax/hosts.hfaxd</pre>
<p>
on the bottom of the file
</p>
<pre class="code">192\.168\.:::</pre>
<pre class="code"># exit
# vserver fax restart
# vserver fax enter</pre>
<pre class="code">faxstat -a -s</pre>
<p>should show something like this</p>
<pre class="code">HylaFAX scheduler on fax.cipar.net: Running
Modem ttyS0 (+**.**.*******): Running and idle</pre>
<p>
Add a fax user. This will create a user named “user” with userID 101 and no password.
</p>
<pre class="code"># faxadduser -u 100 user</pre>
<p>Add an administrator. This will create a user named admin with admin password &lt;password&gt;:</p>
<pre class="code"># faxadduser -a &amp;lt;password&amp;gt; -p &amp;lt;password&amp;gt; -u 100 admin</pre>
</div>
<h3><a name="avantfax" id="avantfax">AvantFax</a></h3>
<div class="level3">
<p>
<em>Below seems largely to be not needed anymore!!!!!!! There is a debian-install.sh now that seems to do basically all below automatically, i have tried it and it worked, even the “rotate” option for the faxes work now without a problem.<br />
The script was not perfect yet since some steps needed to be repeated after the script manually.<br />
Manually repeat this steps from the script:</em></p>
<pre class="code">/usr/sbin/faxadduser -f newhosts -a pwd www-data
/usr/sbin/faxdeluser localhost
/usr/sbin/faxdeluser 127.0.0.1
echo 127.0.0.1 &amp;gt;&amp;gt; newhosts
cat /etc/hylafax/hosts.hfaxd &amp;gt;&amp;gt; newhosts
cat newhosts &amp;gt; /etc/hylafax/hosts.hfaxd
rm -f newhosts
reboot the server</pre>
<p>
first we install all the needed dependencies</p>
<pre class="code"># apt-get install apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 php5 php-pear php5-mysql php5-pgsql php5-cli php5-cgi mysql-server netpbm php5-imagick dh-make-php libmagic-dev libungif4g libpng3 sudo libtiff4-dev gs-gpl gsfonts expect php5-dev make php-pear psutils libnetpbm10-dev libungif-bin libungif4-dev php-db php-file php-http php-mail php-mail-mime php-net-smtp php-net-socket php-xml-parser wdiff
</pre>
<p>
And the avantfax itself</p>
<pre class="code"># cd /usr/src
# wget http://easynews.dl.sourceforge.net/sourceforge/avantfax/avantfax-3.0.6.tgz
# tar zvxf avantfax-3.0.6.tgz
# cd avantfax-3.0.6</pre>
<pre class="code"># pear channel-update pear.php.net
# pear upgrade-all
# pear install Mail Net_SMTP Mail_mime MDB2_driver_mysql MDB2_driver_pgsql
# pecl install fileinfo</pre>
<pre class="code"># chmod 0770 avantfax/includes/templates/admin_theme/templates_c/ avantfax/includes/templates/admin_theme/cache/ avantfax/includes/templates/main_theme/templates_c/ avantfax/includes/templates/main_theme/cache/
# chown www-data:www-data avantfax/includes/templates/admin_theme/templates_c/ avantfax/includes/templates/admin_theme/cache/ avantfax/includes/templates/main_theme/templates_c/ avantfax/includes/templates/main_theme/cache/
# chmod 0755 avantfax/includes/faxcover.php avantfax/includes/faxrcvd.php avantfax/includes/notify.php avantfax/tools/update_contacts.php avantfax/tools/faxcover.php avantfax/includes/avantfaxcron.php
</pre>
<pre class="code"># cp avantfax/includes/local_config-example.php avantfax/includes/local_config.php</pre>
<pre class="code"># nano avantfax/includes/local_config.php</pre>
<p>Change the following defaults</p>
<pre class="code">$FAXRMPWD = &quot;pwd&quot;;
define (&#039;ADMIN_EMAIL&#039;, &#039;root@localhost&#039;);
$AVANTFAX_SERVERNAME = &#039;fax.cipar.net&#039;; //</pre>
<p>
Make sure ”-a pwd” is the same as the “$FAXRMPWD = “pwd”;” as above</p>
<pre class="code"># /usr/sbin/faxadduser -f newhosts -a pwd www-data
# /usr/sbin/faxdeluser localhost
# /usr/sbin/faxdeluser 127.0.0.1</pre>
<pre class="code"># echo 127.0.0.1 &amp;gt;&amp;gt; newhosts
# cat /var/spool/hylafax/etc/hosts.hfaxd &amp;gt;&amp;gt; newhosts
# cat newhosts &amp;gt; /var/spool/hylafax/etc/hosts.hfaxd
# rm -f newhosts</pre>
<pre class="code"># echo &#039;JobFmt: &quot;%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s&quot;&#039; &amp;gt;&amp;gt; /etc/hylafax/hyla.conf</pre>
<pre class="code"># mv avantfax /var/www/avantfax</pre>
<pre class="code"># chown -R www-data.www-data /var/www/avantfax
# chmod -R 777 /var/www/avantfax/tmp /var/www/avantfax/faxes</pre>
<pre class="code"># nano /etc/apache2/sites-enabled/000-default</pre>
<pre class="code">NameVirtualHost *
 &amp;lt;VirtualHost *&amp;gt;
        DocumentRoot /var/www/avantfax
        ServerName avantfax
&amp;lt;/virtualhost&amp;gt;
</pre>
<pre class="code"># /etc/init.d/mysql restart
# /etc/init.d/apache2 restart</pre>
<pre class="code"># mysql --user=root -e &quot;GRANT ALL ON avantfax.* TO avantfax@localhost IDENTIFIED BY \&quot;d58fe49\&quot;&quot; mysql
# mysqladmin --default-character-set=utf8 --user=avantfax --password=d58fe49 create avantfax
# mysql --user=avantfax --password=d58fe49 avantfax &amp;lt; create_tables.sql
# mysqlshow --user=avantfax --password=d58fe49 avantfax</pre>
<pre class="code"># ln -s /var/www/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd.php
# ln -s /var/www/avantfax/includes/notify.php  /var/spool/hylafax/bin/notify.php
# mv /usr/bin/faxcover /usr/bin/faxcover.old
# ln -s /var/www/avantfax/includes/faxcover.php /usr/bin/faxcover
# ln -s /usr/share/file/magic* /usr/share/misc/</pre>
<pre class="code"># cat /etc/sudoers | grep -v requiretty &amp;gt; /tmp/sudoers
# echo &quot;www-data ALL= NOPASSWD: /sbin/reboot, /sbin/halt, /usr/sbin/faxdeluser, /usr/sbin/faxadduser -u * -p * *&quot; &amp;gt;&amp;gt; /tmp/sudoers
# mv /etc/sudoers /etc/sudoers.orig
# mv /tmp/sudoers /etc/sudoers
# chmod 0440 /etc/sudoers</pre>
<pre class="code"># nano /var/spool/hylafax/etc/config</pre>
<p>and add the following on at the bottom</p>
<pre class="code">#
## AvantFAX configuration
#
NotifyCmd:      bin/notify.php</pre>
<pre class="code"># nano /var/spool/hylafax/etc/config.ttyS0

#
## AvantFAX configuration
#
FaxrcvdCmd:     bin/faxrcvd.php</pre>
<pre class="code"># crontab -l &amp;gt; /tmp/tab
# echo -e &quot;0 0 * * *\t/var/www/avantfax/includes/avantfaxcron.php -t 2&quot; &amp;gt;&amp;gt; /tmp/tab
# crontab /tmp/tab
# rm -f /tmp/tab</pre>
<pre class="code"># mv /var/spool/hylafax/etc/config /etc/hylafax/config
# mv /var/spool/hylafax/etc/hosts.hfaxd /etc/hylafax/hosts.hfaxd
# mv /var/spool/hylafax/etc/config.ttyS0 /etc/hylafax/config.ttyS0
# /etc/init.d/hylafax restart</pre>
<pre class="code"># nano /etc/postfix/master.cf</pre>
<p>At the top comment out:</p>
<pre class="code">#smtp      inet  n       -       -       -       -       smtpd</pre>
<p>And att the bottom add</p>
<pre class="code">fax       unix  -       n       n       -       1       pipe
  flags= user=faxmail argv=/usr/bin/faxmail -d -n \${user}</pre>
<pre class="code"># nano /etc/postfix/transport</pre>
<p>and add</p>
<pre class="code">yourdomain.com       fax:localhost</pre>
<pre class="code"># postmap /etc/postfix/transport</pre>
<pre class="code"># nano /etc/hylafax/faxmail.conf</pre>
<pre class="code"># nano /etc/postfix/main.cf</pre>
<pre class="code">fax_destination_recipient_limit = 1</pre>
<pre class="code">nano /etc/hylafax/faxmail.conf</pre>
<pre class="code">AutoCoverPage: false
TextPointSize: 12pt
Headers: Message-id Date Subject From
MailUser: faxmail</pre>
<pre class="code"># /etc/init.d postfix reload</pre>
<p>Be carefull not to loose any sleep when doing this the first time, but if you do the result will look like this!
</p>
<p>
<a href="http://www.songshu.org/wp-content/plugins/wp-dokuwiki/lib/exe/detail.php?id=&amp;cache=cache&amp;media=screenshot-1.png" class="media" title="screenshot-1.png"><img src="http://www.songshu.org/wp-content/plugins/wp-dokuwiki/lib/exe/fetch.php?w=&amp;h=&amp;cache=cache&amp;media=screenshot-1.png" class="media" alt="" /></a>
</p>
</div>
<h2><a name="backup" id="backup">backup</a></h2>
<div class="level2">
<p>For the backup we need ssh and rsync
</p>
<pre class="code"># apt-get install openssh-server
# apt-get install rsync</pre>
<p>and make sure ssh only listens to the local address</p>
<pre class="code">ListenAddress 192.168.1.10</pre>
<pre class="code"># /etc/init.d/ssh restart</pre>
<pre class="code">newvserver --vsroot /VSERVERS --hostname fax --domain cipar.net --ip 192.168.1.10/24 --dist etch --mirror http://192.168.1.12:3142/debian.apt-get.eu/debian --interface dummy0</pre>
<pre class="code">cd /usr/src</pre>
<pre class="code">wget http://easynews.dl.sourceforge.net/sourceforge/avantfax/avantfax-3.1.3.tgz</pre>
<pre class="code">tar zvxf avantfax-3.1.3.tgz</pre>
<pre class="code">cd avantfax-3.1.3</pre>
<pre class="code"> nano debian-prefs.txt</pre>
<pre class="code"># DEFAULT INSTALL VALUES FOR Debian
#
# BEWARE: Only run the install script once or risk having duplicate
#         settings in your sendmail, sudo, and other configuration files
#
# The debian-install.sh script refers to this file
#

# The domain name for configuring email to fax
FAXDOMAIN=fax.cipar.net

# The installation directory for AvantFAX
INSTDIR=/var/www/avantfax

# The root directory where HylaFAX bin files are stored (typically, /usr or /usr/local)
HYLADIR=/usr

# HylaFAX $SPOOL directory (typically, /var/spool/hylafax or /var/spool/fax)
SPOOL=/var/spool/hylafax

# These are the database settings AvantFAX will create and use
USER=avantfax
PASS=d58fe49
DB=avantfax

# if the MySQL password for root is set, specify it here
ROOTMYSQLPWD=

# The user and group which Apache runs as (typically, apache, wwwrun, nobody, etc...)
HTTPDUSER=www-data
HTTPDGROUP=www-data</pre>
<p>&lt;/div&gt;
</p>
</div>
</div>
<p><!-- end Dokuwiki generated code--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.songshu.org/index.php/avantfax-on-debian/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
