Email2fax is a script that helps users send faxes via their Asterisk PBX system. The script is written in bash and simplifies the fax-sending process.
One of the key features of email2fax is that it expects to find a fax number in the subject field and one PDF or one TIFF attachment. Once these criteria are met, this program converts an attachment into the correct format and instructs Asterisk to send it to the designated number.
As mail2fax was not user-friendly and had limited support for PDF attachments, the author of this program decided to create a new implementation. Currently, email2fax requires AstFax, meaning that processed attachments in the correct format are passed to AstFax and then to Asterisk.
To use email2fax, you must ensure that your Asterisk box can receive faxes and that Spandsp is correctly set up. You can then download and extract the email2fax package, including mpack and munpack if they are not already in your system. After composing a sample message, attach a PDF file and include the fax number in the subject field. Save the message on a disk as message.eml and copy it to your Asterisk box. Finally, send your first fax from the command line by entering 'cat message.eml | sudo -u asterisk email2fax --debug'.
If any issues arise during the faxing process, check that Spandsp is set up correctly and consult the /var/log/asterisk/faxlog file or connect to the Asterisk console. Once everything is working correctly, set up a .procmailrc for the asterisk user and try sending the same email directly to asterisk@yourasteriskbox.
Recently, the program has undergone some updates. Handling for multi-page TIFF files has been fixed, and all *.call files are now given random names. Overall, email2fax is an excellent program for those who require a straightforward solution for sending faxes via Asterisk PBX.
Version 1.2: N/A