I compiled Asterisk 11 from source and I have installed iaxmodem, and hylafax server. I did create an account at google ([email protected]) and by following https://easyengine.io/tutorials/linux/u ... mail-smtp/, I can send emails from the system.

Now all the faxes that arrive at my system they get delivered as email attachments. I have a success rate of 100%. fax2email is a really nice feature.

If I want to send a fax, then from the command line I use the sendfax command to send faxes. It works really nice.

I would like to be able to send email from [email protected] to [email protected] and then the system will send the fax. I am lost in how to setup my system to receive emails and parse the attachments and the fax number to hylafax.

Any ideas, please?

  • Hi John. Unfortunately, your first question here appears to have little to do with the RPi, and maybe more suited to SE SuperUser. BTW, can you please correct the URL, as it appears to have been truncated, and therefore the link is useless? Should it be "easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp"? Could you also use capitals (when necessary) to make your text easier on the eye? Thanks. Feb 10, 2016 at 9:19

1 Answer 1


You will need to somehow check your mailbox, process the mails and parse the contents to the system shell. There is probably no turnkey solution for this; you will need to develop your own.

disclaimer: I'm giving you my ideas but there's tons of ways and starting points really.

What's probably the best solution? Having a Python script running on the raspberry doing all the work.

PRO: clean, single server solution

CON: (IMHO) it's easier to find PHP examples for doing this than Python ones.

What would be my personal solution:

1) An external PHP webserver checks the mailbox every minute, processes the contents, parses the contents in a queue

2) The raspberry checks that queue every minute via a simple cron'ned wget or curl and parses that contents to the system in a similar way as you did manually at the command line.

PRO: the least amount of overhead services on your raspberry: no need to run a PHP server.

CON: potential security issues because unsecure communication between the php script and the raspberry.

TLDR: This most probably will require some development. First ones that come in my mind is Python, Perl or PHP. Have done something similar in PHP this would be my first language of choice. However if you want to run PHP on your raspberry, this will require you to run (at the very least) a PHP server which obviously will eat valuable system resources.

Alternatively you can choose to run the parsing script on an external webserver which already runs PHP, and have the Pi to check that webpage regularly via a cron.

No matter which language you use, if you're leaning towards basic experience level, I'd suggest you don't use a gMail mailbox; these are only accessible via secure layers and - whilst definitely technically capable - will yet add another barrier of problems in your development process. Choose a more basic mailbox (at your provider perhaps). Anyway you can setup your gMail to forward to this address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.