Installation
Enswitch can optionally process incoming emails and send the attached file as a fax to the destination phone number.
The following installation instructions apply to the Postfix mailer daemon. If your machines run a different daemon then you will need to work out how to configure it, and direct incoming emails to /opt/enswitch/current/bin/email_to_fax, running it as the "enswitch" user.
- Choose a domain for your email to fax service (for example fax.yourcompany.com) and create a DNS entry for it with your DNS provider. It should resolve to the IP address of the machine(s) which will process incoming emails, which can be a high-availability IP address managed by Heartbeart or Corosync/Pacemaker.
- Configure the postfix mailer daemon on the machine(s) to accept incoming emails, and allow incoming traffic for TCP port 25 through the firewall.
- On machines running Debian or Ubuntu:
- apt-get install libemail-mime-perl postfix-pcre
- On machines running CentOS, Redhat Enterprise, or Fedora:
- yum install perl-Email-MIME
- Edit /etc/postfix/main.cf and append the domain for email to fax to the "mydestination" line. Then append at the bottom of the file the lines:
transport_maps = hash:/etc/postfix/transport virtual_alias_maps = pcre:/etc/postfix/virtual
- Edit (creating it if necessary) /etc/postfix/transport and append at the bottom of the file the line:
fax.yourcompany.com email_to_fax:
Remember to replace fax.yourcompany.com with the actual domain you are using. - Edit (creating it if necessary) /etc/postfix/virtual and append at the bottom of the file the line:
/^.+@fax.yourcompany.com/ enswitch@fax.yourcompany.com
Remember to replace fax.yourcompany.com with the actual domain you are using. - Edit /etc/postfix/master.cf and append at the bottom of the file the lines:
email_to_fax unix - n n - - pipe flags=FR user=enswitch:enswitch argv=/opt/enswitch/current/bin/email_to_fax
- Make your changes take effect by running:
postmap /etc/postfix/transport postmap /etc/postfix/virtual service postfix restart
- Ensure that the email domain (such as fax.yourcompany.com) has an entry under the Global -> Settings -> Domains menu.
- Optionally, set the rate plan custom settings for "Email to fax reply body" and "Email to fax reply from address".
Testing
- Ensure that the email address you send from is set as the "Email address" for a user in Enswitch, and that the user's role has "Send faxes" permission.
- Send an email to 234567891@fax.yourcompany.com, where 234567891 is the number to make the call to, and fax.yourcompany.com is the domain configured above.
- Note that the number to call can be in the email's 'To' field or 'Cc' field, but cannot be in the 'Bcc' field.
- The subject of the email can contain the calling number, which must exist as a number (not a feature code) in the customer. If the calling number is not in the subject then the "Fax number" of the Enswitch user will be used, or as a last resort the default callerid of the customer.
- The file attached to the email will be faxed and must be in .pdf, .ps, .tif, or .txt format. If two files are attached then the first will be treated as a cover letter and prepended to the fax, otherwise the text of the email itself will be prepended as a cover. More than two attached files are not supported.
- Check /var/log/mail.log for errors /var/log/enswitch/trace_DATE.log for information. You can enable debug logging in /etc/enswitch/logs.ini.
- If the sender was a valid Enswitch user then an entry will also be recorded in the audit table for the user's customer.