Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th February 2012, 20:18
n0fx n0fx is offline
Member
 
Join Date: Apr 2006
Posts: 36
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default Avantfax 3.3.3 with debian 6.0 setting up mail2fax

OS: Debian 6.0.3 i386
Avantfax: 3.3.3
Apache: 2.2.16
mailer-daemon: postfix

I have successfully got Avantfax installed and it works but I was trying to setup the mail2fax feature. I installed Avantfax from scratch without using any scripts. I read the guide here but it was for an older version of Debian, which didn't apply to the newer version of avantfax and Debian that I was using. I ended up using this guide to install it:

http://www.alessandro-pensato.it/ind...unti&Itemid=69

I also read that there is a script in the source package called setup-postfix.sh but when I run it, I get this error:

root@hylafax:/usr/src/avantfax-3.3.3# ./setup-postfix.sh
./setup-postfix.sh: 7: email2fax.txt: not found
Installing required packages
./setup-postfix.sh: 13: yum: not found
./setup-postfix.sh: 13: yast: not found
Reading package lists... Done
Building dependency tree
Reading state information... Done
postfix is already the newest version.
The following package was automatically installed and is no longer required:
libpq5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
./setup-postfix.sh: 17: /sbin/service: not found
Configuring Email to FAX for domain
postmap: fatal: /etc/postfix/main.cf, line 41: missing '=' after attribute name: "-e transport_maps = hash:/etc/postfix/transport "
./setup-postfix.sh: 42: /sbin/chkconfig: not found
./setup-postfix.sh: 43: /sbin/service: not found
Done
root@hylafax:/usr/src/avantfax-3.3.3#

========================

This is the script itself (setup-postfix.sh):

#!/bin/sh
#
# This script will configure postfix for email to fax
# Only run once
#

email2fax.txt

# INSTALL REQUIRED APPS IF NOT ALREADY INSTALLED

echo "Installing required packages"

yum -y install postfix || yast --install postfix || apt-get install postfix

# CONFIGURE POSTFIX

/sbin/service postfix stop

echo "Configuring Email to FAX for domain ${FAXDOMAIN}"

cat >> /etc/postfix/master.cf << EOF
fax unix - n n - 1 pipe
flags= user=$FAXMAILUSER argv=/usr/bin/faxmail -d -n -NT \${user}

EOF

echo -e "${FAXDOMAIN}\tfax:localhost" >> /etc/postfix/transport
echo -e "transport_maps = hash:/etc/postfix/transport\nfax_destination_recipient_limit = 1" >> /etc/postfix/main.cf

postmap /etc/postfix/transport

# CONFIGURE FAXMAIL

cat > /etc/hylafax/faxmail.conf << EOF
AutoCoverPage: false
TextPointSize: 12pt
Headers: Message-id Date Subject From
MailUser: $FAXMAILUSER

EOF

/sbin/chkconfig postfix on
/sbin/service postfix start

echo "Done"

# DONE #

========================

Email2fax.txt file:

root@hylafax:/usr/src/avantfax-3.3.3# pico email2fax.txt
GNU nano 2.2.4 File: email2fax.txt

# This is the configuration file for Email 2 FAX
# Edit your domain name below and save this file
# before launching the scripts named below
#
# To setup Postfix run: ./setup-postfix.sh
# To setup Sendmail run: ./setup-sendmail.sh

FAXDOMAIN=hylafax.localdomain.local

# This user account must exist in your authentication system (ie. PAM, /etc/passwd, LDAP)
# in order for the Postfix configuration to work (ie. uucp).
# NOTE: Be sure to also set this value in local_config.php
# DEBIAN users may want to set this to faxmaster for postfix installs
FAXMAILUSER=faxmail

========================

This is how my /etc/postfix/main.cf looks like after running the script:

root@hylafax:/usr/src/avantfax-3.3.3# pico /etc/postfix/main.cf
GNU nano 2.2.4 File: /etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = hylafax.localdomain.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = hylafax.localdomain.local, localhost.localdomain.local, localhost
# relayhost = smtp.localdomain.local
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
-e transport_maps = hash:/etc/postfix/transport
fax_destination_recipient_limit = 1

========================

and this is the /etc/postfix/transport file:

root@hylafax:/usr/src/avantfax-3.3.3# pico /etc/postfix/transport
GNU nano 2.2.4 File: /etc/postfix/transport

-e fax:localhost

It looks like the script isn't doing what it's supposed to be doing, which is adding entries to the /etc/postfix/main.cf and creating the /etc/postfix/transport file. I couldn't figure out how to get it working, so I deleted the created entries to keep my avantfax working. I created a local user called faxmail for the script as well.

Does anyone know how to setup Avantfax to do mail2fax with debian 6.0 and postfix? I can't find any documentation on how to get this done and no one seems to be having this problem. Thanks
Reply With Quote
Sponsored Links
Reply

Bookmarks

Tags
debian avantfax hylafax

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dovecot v2 with ISPConfig 3 CSsab Installation/Configuration 13 13th September 2012 19:01
Installation just stops, and dies. cosmicsafari Installation/Configuration 3 19th July 2011 10:24
Some errors after using iRedMail to setup mail server DaaX HOWTO-Related Questions 1 21st January 2010 15:27
[debian 5 + ispconfig 3] Unable to send mail tanakskool HOWTO-Related Questions 6 4th November 2009 18:20
How to install OpenOficeOrg 3.0.0 in Ubuntu 8.04 ernesthagger HOWTO-Related Questions 43 23rd December 2008 14:42


All times are GMT +2. The time now is 11:55.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.