Installation

From Email2fax - email to fax gateway for Asterisk

Jump to: navigation, search

[edit] Installation

Prerequisites:

  • make sure you have libtiff-tools package (for tiff2ps command; in some distributions tiff2ps is in libtiff-progs package)
  • make sure your Asterisk box can receive faxes - Spandsp has to be set up correctly
  • make sure the sendmail command can be executed by the asterisk-user
  • you need Ghostscript version greater than 8 - versions 7.x will not work


Installation:

  • download and extract email2fax package.
  • copy email2fax into /usr/local/bin/
  • install the munpack tool, if you don't have it on your system already (usually it comes in mpack rpm/deb/etc. package; however, it is also in the email2fax package)
  • edit /usr/local/bin/email2fax as needed

NOTE! The script contains some special characters (windows end-of-line), so make sure you edit it with an editor that doesn't break it! mcedit from midnight commander is an editor which edit such files properly; most Windows tools will break it.


Testing:

  • compose a sample message - attach a PDF file, and put a fax number in the subject field - save it on a disk as message.eml; copy it to your Asterisk box
  • try to send your first fax from the command line:
cat message.eml | sudo -u asterisk /usr/local/bin/email2fax --debug
  • if it worked, congratulations, if not, make sure Spandsp is set up correctly (i.e., you are able to receive faxes), consult /var/log/asterisk/faxlog file, connect to asterisk console (sudo -u asterisk asterisk -crvvvvv), etc.


Setting up the email2fax gateway:

  • if everything works, set up a .procmailrc for the asterisk user - save it as ~asterisk/.procmailrc (owned by asterisk user, and readable by asterisk user only):
:0fw
| /usr/local/bin/email2fax
  • and try to send this same email directly to asterisk@yourasteriskbox


It is also possible to configure it without using procmail: an other way for postfix user without procmail.

When you installed email2fax, learn how to use it.

Personal tools