email2fax and Asterisk to do eFaxing

It's basically free bash shell script available from: http://wpkg.org/email2fax/index.php/Main_Page

Make sure you have the required tools:

  1. libtiff
  2. ghostscript
  3. mpack/munpack

Where you can e-mail your Asterisk box and it will fax it to the phone number in the subject line.  The good news ends there, it is fairly undocumented and buggy.

Take for example how the documentation mentions you can invoke from the command line like this:

cat "somefile.eml"|email2fax --nodebug

Instead it keeps displaying the help message, I guess this is an oversight but this is supposed to be the stable version.

email2fax
email2fax v1.2beta, email to fax gateway for Asterisk

Usage:

"piped message" | email2fax [OPTIONS]

Options:
--nomail        don't send a confirmation email (default: send confirmation email)
--nodelete      don't delete temporary files (default: delete temporary files)
--nofax         don't send the fax (default: send fax)
--debug         enable debug logging

Email has to contain either one PDF attachment OR one TIFF attachment, and
a destination fax number as a subject.

Examples:

This one sends a fax from the command line, and enables debug logging:

cat message.eml | sudo -u root email2fax --debug


This one enables debug logging, doesn't send a confirmation email,
doesn't delete temporary files, and doesn't send a fax (useful for testing etc.):

cat message.eml | sudo -u root email2fax --debug --nomail --nodelete --nofax


This entry in .procmailrc located in asterisk home directory intercepts all emails
to asterisk, and passes them to email2fax:

:0fw
| /usr/local/bin/email2fax


By default, email2fax logs ALL messages to /var/log/asterisk/faxlog, and saves temporary files in /tmp/email2fax.
These paths, along with several different variables, can be changed
at the beginning of this script (/usr/bin/email2fax).

See http://wpkg.org/email2fax for updates, bug reports, and answers.

I've tried hacking around with the code, it may work if you e-mail and use procmail but judging from the mailing list it sounds like others are having difficulty too.

It's too bad but I thought I'd try this tool, perhaps another day when I have more time.


Tags:

email, asterisk, efaxingit, bash, shell, http, wpkg, org, index, php, main_page, libtiff, ghostscript, mpack, munpack, undocumented, buggy, documentation, mentions, invoke, quot, somefile, eml, nodebug, displaying, oversight, beta, gateway, usage, piped, nomail, confirmation, default, nodelete, delete, nofax, debug, enable, logging, contain, pdf, attachment, tiff, destination, examples, enables, sudo, doesn, etc, entry, procmailrc, located, directory, intercepts, emails, fw, usr, bin, logs, var, faxlog, saves, tmp, paths, variables, updates, ve, hacking, procmail, mailing, difficulty,

Latest Articles

  • How To Upgrade Debian 8,9,10 to Debian 12 Bookworm
  • Linux dhcp dhclient Mint Redhat Ubuntu Debian How To Use Local Domain DNS Server Instead of ISPs
  • Docker dockerd swarm high CPU usage cause solution
  • Docker Minimum Requirements/How Efficient is Docker? How Much Memory Does Dockerd Use?
  • qemu-nbd: Failed to set NBD socket solution qemu-nbd: Disconnect client, due to: Failed to read request: Unexpected end-of-file before all bytes were read
  • apache2 httpd apache server will not start [pid 22449:tid 139972160445760] AH00052: child pid 23248 exit signal Aborted (6) solution Mint Debian Ubuntu Redhat
  • How to use the FTDI USB serial cable to RJ45 adapter to connect to the console on Cisco/Juniper Switch Router Firewall in Linux Ubuntu Debian Redhat
  • How To Setup Python3 in Ubuntu Docker Image for AI Deep Learning
  • How to Configure NVIDIA GPUs with Docker on Ubuntu: A Comprehensive Guide for AI Deep Learning CUDA Solution
  • Linux Ubuntu Mint how to check nameservers when /etc/resolv.conf disabled solution
  • Docker cannot work on other overlayfs filesystems such as ecryptfs won't start overlayfs: filesystem on '/home/docker/overlay2/check-overlayfs-support130645871/upper' not supported as upperdir
  • Linux How To Access Original Contents of Directory Mounted Debian Mint CentOS Redhat Solution
  • ecryptfs how to manually encrypt your existing home directory or other directory
  • How to Reset CIPC Cisco IP Communicator for CME CUCM CallManager
  • Internet Explorer Cannot Download File "Your security settings do not allow for this file to be downloaded." Security Settings Solution
  • Linux How To Upgrade To The Latest Kernel Debian Mint Ubuntu
  • Firefox how to restore and backup saved passwords and history which files/location
  • Linux How To echo as root solution to use tee permission denied solution Ubuntu Debian Mint Redhat CentOS
  • Linux how to keep command line bash process running if you are disconnected or need to logout of SSH remotely
  • Linux swapping too much? How to check the swappiness and stop swapping