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





On Thu, Mar 4, 2010 at 11:06 AM, David Mimms <david.mimms@xxxxxxxx> wrote:
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:

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


Dave,
    Thanks again for your advice.  And it seems this SHOULD be working correctly, however when the mail hits the server I recieve this in the maillog:

Mar  4 13:26:56 hylafax sendmail[3757]: o24IQtlH003755: to=<(faxnumber)@fax.mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=fax, pri=237064, relay=18776564330, dsn=5.3.4, stat=Service unavailable
Mar  4 13:26:56 hylafax sendmail[3757]: o24IQtlH003755: o24IQulH003757: DSN: Service unavailable

I am bouncing mail off our primary mail server into this server using qmail smtproutes.  But the fax server currently resides behind a firewall.  So I opened port 25 to the fax server and put in DNS fax.mydomain.com as the firewall static IP so mail gets delivered to it, and it does.  To make the fax server think IT is fax.mydomain.com I added it to the host file with the private IP of the fax server, which seems to work,   I am not certain however that this configuration is whats causing the problem, however I don't see how it could since locally it believes it is fax.mydomain.com regardless of the DNS.

Any other suggestions?

Scott






Project hosted by iFAX Solutions