Usage

From Email2fax - email to fax gateway for Asterisk

Jump to: navigation, search

[edit] 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 asterisk 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 asterisk 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/sbin/email2fax

To find out where your asterisk user's home directory is switch user to the user named 'asterisk' and cd to the $Home directory. This is where the .procmailrc belongs.

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 email2fax script.

Personal tools