FOOD FOR THOUGHT email to fax. incrediblefax11.sh

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
Using install scripts: IncrediblePBX13-12R-OAUTH.sh, incrediblefax11.sh
OS: CentOS 7 i686

Question:
Isn't the incrediblefax11.sh script supposed to configure the email-to-fax capability of HylaFAX+ ? If not, why not.


What is Email to Fax:

You send an email, with one or more documents attached, to [email protected]

Sendmail (or whichever the locally installed mail server on the pbx) gets the email, passes the email to a HylaFAX+ script add-on made for sendmail, which calls the hylafax+ program mailfax, with the phone number, subject, from, to, date, etc, parsed from the email message.

Hylafax renders the email attachments to postscript pages, and transmits it as a fax to the number provided.

More info:
http://hylafax.sourceforge.net/man/faxmail.php
https://wiki.contribs.org/HylaFax#Sending_faxes_by_e-mail
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
No . it won't do it all on itself it as a "recipe". It is up to you to configure your mail server to handle your [email protected] domain (or however you care to set that up,) incoming emails to properly pipe incoming email to hylafax via the "virtual" user (NXXNXXXXXX) in that mail domain , relatively easy in postfix, a little trickier with sendmail. Be very careful or you will be sending faxes for any bad actor who realizes your lack of security!!
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
No . it won't do it all on itself it as a "recipe". It is up to you to configure your mail server to handle your [email protected] domain (or however you care to set that up,) incoming emails to properly pipe incoming email to hylafax via the "virtual" user (NXXNXXXXXX) in that mail domain , relatively easy in postfix, a little trickier with sendmail. Be very careful or you will be sending faxes for any bad actor who realizes your lack of security!!

Good point, in the notes with Hylafax they mention be careful, allow only email users who have authenticated with SMTP-AUTH to send email to fax.

About the configuring, Hylafax comes with pre written scripts for postfix, sendmail, and other mail servers, to get the mailserver to pipe the email message from the mailserver to the hylafax faxmail program.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
I'm not so sure about that, Hylafax comes with no pre -written scripts, there are however any number of third party recipes published that accomplish that both with Hylafax and Hylafax+ (these guys are NOT the same) , none are "included" and each requires you to set your mail server up to accept either [email protected] (and you need to be secure there :) )or parse the subject line of the mail you send to something like [email protected], these last recipes are generally abhorred by my clients however as they must use very particular strings in that subject line and it is a two step process, you can't easily just send/forward a document, just saying that because I have being doing email2fax over hylafax for years. It is always about how you set up your local MTA securely and how that MTA successfully sends mail from your machine locally though the pipe alias to sendfax
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Mail server design in Incredible PBX is for outbound mail support only. Too many security issues in the other direction so... You're on your own.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
As I said earlier, restricting access mapped by domain, ip address hostnames/email addresses is relatively trivial in postfix ( just edit /etc/postfix/access), but as @wardmudy states not so reliable in good old sendmail. mapping the access to SIP allowed networks to similarly restricted access to port 25 in iptables is probably 90% effective for desktop machines as cell phones are less likely to send faxes. . . YMMV and so might your phone bill :) , in NANP land allow (1)[email protected] but deny anything longer than 10 (11) digits.
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
I'm not so sure about that, Hylafax comes with no pre -written scripts ... none are "included" and each requires you to set your mail server up to accept either [email protected] (and you need to be secure there :) )or parse the subject line of the mail you send to something like [email protected] ...

In fact HylaFAX+ does come with four pre-written scripts for postfix, qmail, sendmail, and "smail", inside of each is detail on the command to insert into each mail server's config

Code:
/usr/src/hylafax-5.5.8/faxmail/mailfax.sh-postfix
/usr/src/hylafax-5.5.8/faxmail/mailfax.sh-qmail
/usr/src/hylafax-5.5.8/faxmail/mailfax.sh-sendmail
/usr/src/hylafax-5.5.8/faxmail/mailfax.sh-smail

mailfax.sh-sendmail:
Code:
#! /bin/sh
#
# mailfax - email to fax gateway for sendmail
#
# This file should be installed as /usr/local/lib/fax/mailfax
# (or whatever is specified in the sendmail.cf file).
#
# Edit your sendmail configuration.  Include the following
# mailer definition (or similar):
#
# Mfax, P=/usr/local/lib/fax/mailfax, F=DFMShu, M=100000,
#       A=mailfax $u $h $f
#
# add the following address rewriting rule to rule set 0:
#
# # forward FAX messages to HylaFAX software
# R$+<@$+.FAX>          $#fax $@ $2 $: $1               [email protected]
#
# and arrange things so that rule set 3 will not attempt a host map lookup
# on FAX addresses.  If you are using the .cf file generated by the
# m4 macros as your starting point (as implemented in sendmail 8.8.8),
# this can be done by adding these lines:
#
# # Make FAX a pseudo domain, to avoid failed DNS lookups
# CPFAX
#
# Things to note:
#
# 1. The above mailer definition includes the S flag which causes
#    sendmail to invoke this script with the UID of the sender when
#    mail is local.  This causes the submitted facsimile job to be
#    owned by the sender which means they can remove it, alter its
#    parameters, etc.  Mail received from another system will be
#    owned by the user who's UID is specified in the sendmail config
#    file as the default UID to use for doing delivery.  Typically
#    this is daemon or similar.  Whatever user it is, they must be
#    permitted to submit facsimile jobs w/o a password from the host
# 2. The default setup below disables automatic cover page generation.
#    If you enable it, faxmail will extract the name of the receipient
#    from the To: header.  This is preferable to passing in the "user"
#    information in the mail address (readily available from sendmail)
#    since ``more friendly'' information may be available in the To:
#    line in the form of a comment; e.g. To: [email protected] (Joe Schmo)
#    would result in ``Joe Schmo'' being displayed on the cover page.
# 3. If automatic cover page generation is to be used it is probably
#    a good idea to create a special-purpose cover page template for
#    facsimile generated though this gateway.  By default faxmail will
#    use the default system cover page template.  An X-FAX-Cover-Template
#    header line may also be inserted to select a cover page template file.
# 4. Enabling a gateway facility with the scheme described here permits
#    anyone to submit a facsimile if non-local submissions are accepted.
#    Read the faxmail(1) manual page for some comments on extending
#    the software to safely restrict off-machine submissions.
# 5. The most effective use of this software involves inserting special
#    headers that indicate how faxmail and the rest of the HylaFAX
#    software should process the submitted facsimile.  Consult the
#    faxmail documentation for details.
#
/usr/local/bin/faxmail -n -d "$1" "$2"

I'm thinking this modification to the config of sendmail should be added to the installer script..
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
Sorry, I don't use sendmail, but as I said they are more recipes than scripts (and IMHO all horribly insecure ones) , and as @wardmundy says there is no support for inbound emailing in this distro and that you "are on your own here"
 
Last edited:

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
But if you do it and write it up - it could be included in the "add-on install instructions"
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
But if you do it and write it up - it could be included in the "add-on install instructions"

OK @krzykat I've already made improvements and bug fixes to the incrediblefax11.sh installer. Enabling Email-to-Fax would be the next step.

@dicko Which smtp server do you use on the incredible pbx sever, if not the sendmail configured by the installer.
 
Last edited:

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
I believe this Incredible PBX needs to evolve into an Incredible Unified Communication (UC) solution.

Many of the pieces are already there, such as this Email-to-Fax, they just need to be plugged together.

  1. Fax to email is working right either thru Hylafax or primitively inside Freepbx.to forward a fax to an email address per extension.
  2. Email to Fax, which is what this thread is about. Limit senders to valid users authenticated somehow on the email server.
  3. Text to speech... missing "ttsengines" module for freepbx, with this it should work?
  4. Speech to text. There's mention of it working with a non-commercial developer-hobbyist level google API. Would be great to have the choice to install an STT engine on the pbx server and use local processing power to do crunch the speech audio to text. For best privacy.
  5. Incoming SMS to Email. For GV trunks or any SMS-enabled trunk from a VSP.
  6. Outgoing Email to SMS. Same trunks as incoming SMS.
  7. VOIP Video call to/from Google Hangouts Video call. For GV Motif trunks, since GTalk is the same protocol used for the Hangouts audio/video call.
  8. VOIP Video call to/from Skype video call. For Skype trunks.
  9. Anything else ?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
FYI: TTS and STT have been integral components of Incredible PBX since its inception. Outgoing SMS to email has been supported for at least the last 5 years. RTFM. :patriot:
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
Hey Chris, I am a big proponent for having a more UC solution, but not all do which is why there are add-ons that allow you to do this or that. Many people will take the main product, such as incrediblePBX and then add their own add-ons - such as I told you I do with recompiling asterisk for the SpanDSP. Many people have their own "cookbook" where they change it up a bit. Just glancing through mine, for example if I want Daily CDR reports, I have in my notes to use this. Does that mean it should be on every system? Don't think so, but for anyone that wants it, there it is. If you put enough items in and people request those same items over and over again, then a build with those items sounds like a good plan and what I believe was the reason why incrediblePBX came out of the original PBXinaFlash. Both good products and both with a purpose.

I"ll tell you something that I don't see on your list though that you can get me very excited about and I'd assist on or even help fund, and that is having texting on the UCPortal. Many carriers (more every day) allow texting on their DID's. Text messaging over SIP is actually built into Asterisk. The UCP has a SMS module, but the folks up north only have it for their carrier product instead of all carriers.
 

Members online

No members online now.

Forum statistics

Threads
25,781
Messages
167,507
Members
19,201
Latest member
troutpocket
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top