Sunday, October 17, 2010

Prepare HylaFax for email to fax gateway with qmail

So this took me some time (mainly because I forgot all about qmail configuration), hence I thought to make a note.

We will use virtual domains in qmail to send faxes with Hylafax.

The default in the hylafax supplied script is to use a 'fax' top level name and send emails of the form user@number.fax. I prefer to use instead. To accomplish this:

1)Add to (or create) /var/qmail/control/virtualdomains the line:

Be careful to include the dot in front of the domain. It simply means that we're catching anything below it.

2)Add to /var/qmail/control/rcpthosts:

Which means that anything below the domain will be served locally.

3)Create /var/qmail/alias/.qmail-fax-default and add:
| /usr/local/bin/mailfax

4)Copy from hylafax-source-dir/faxmail/ to /usr/local/bin/mailfax
If you cannot find it, create it empty and read on.

5) Edit /usr/local/bin/mailfax as:

My edits are simply fixing location errors for redhat flavors and add support for emails in the form

6) Do not forget to send a HUP to qmain-send.
Post a Comment