HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] sendmail script help and permissions



I am fairly new to hylafax and have lots of questions.  I have installed the latest CentOS distrobution and also the latest release (6.0.4) of Hylafax on the server.
I installed Faxy to get things up and running quickly and it seems to work well from a web browser.  But what I really wanted to do was to install an email to fax gateway similar to the one our company is already using.  For this to work I would want to be able to have the email address include the destination (telephone number) before the @ (at) sign.  So when someone went to send an email they could simply email the gateway at  15551231234@xxxxxxxxxxxxxx.  Although it seems I can get mail to the server just fine, I can't figure out how to get sendmail to work with this configuration.  I have been pulling my hair out trying to figure it out, and I feel I am close but can't seem to figure it out.


What changes have you made so far to the default /etc/mail/sendmail.mc?

I was attempting to follow the procedure outlined here: http://hylafax.sourceforge.net/howto/faxing.php in section 5.4.
I have created a virtual user in the virtusertable "@fax.domain.com mail2fax" and setup an alias in /etc/aliases for that script to run, and attempted to use the script located there.  Everything seems to function to the point of sending the fax.  What is sent isn't the actual fax but a copy of the fax log of what happened in the process (I see the same thing under /var/spool/hylafax/log/).  The link to the script I was using is in the URL I listed above.


I'm not familiar with that setup.  You may want to try the following in order to setup HylaFAX's faxmail with sendmail:

- Install the sendmail cf package

yum -y install sendmail-cf

- Comment out the  "Port=smtp,Addr=127" line in /etc/mail/sendmail.mc

- Add the following settings to the end of /etc/mail/sendmail.mc

DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
define(`FAX_MAILER_PATH',`/usr/bin/faxmail')dnl
define(`FAX_MAILER_ARGS',`faxmail -NT $u@$h $f')dnl
MAILER(`fax')dnl

- On the shell, run the following:

FAXDOMAIN=fax.mycompany.com
echo $FAXDOMAIN >> /etc/mail/local-host-names
echo -e "@${FAXDOMAIN}\tfax@%1.fax" >> /etc/mail/virtusertable

make -C /etc/mail
/sbin/service sendmail restart

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

EOF


That should get you up and running.  This configuration allows you to send faxes to FAXNUMBER@xxxxxxxxxxxxxxxxx.  If there are any problems, check /var/log/maillog for details.

It's important that the DNS for "fax.mycompany.com" resolves to the fax server, but the fax server's local hostname must not be "fax."  If it is, all local email (ie. to root or another user) will be treated by Sendmail as email destined for HylaFAX's faxmail.  To avoid this, simply make sure that the server's hostname is something other than "fax."

Dave



Project hosted by iFAX Solutions