Skip to content

Email Templates

The email templates are in /var/spool/hylafax/etc/templates, with several languages available. When modifying templates, the best practice is to copy the entire language's directory to a new directory, so that it isn't affected by upgrades. In this example, we make a copy of the English templates:

cd /var/spool/hylafax/etc/templates
cp -a en en-modified
cd en-modified

Edit the templates in that new directory.

Then, configure the system to use your templates:

For incoming faxes, edit /var/spool/hylafax/etc/FaxDispatch For notification on outgoing faxes, edit /var/spool/hylafax/etc/FaxNotify

In each file, you want to set the variable TEMPLATE to the directory with your custom templates. (This line already exists in FaxNotify; it has to be specifically added to FaxDispatch.) Example:

TEMPLATE=en-modified

Once you save the file, your email templates will be used, with no restarts necessary.

FaxDispatch and FaxNotify also control the From: address that's set in those templates. To change that, edit or set the variable FROMADDR.

HTML-based Templates

You can easily switch to the HTML templates and customize them for your organization by following these steps:

Create a copy of the html-sample1 template directory in /var/spool/hylafax/etc/templates/ called custom-html:

cp -a /var/spool/hylafax/etc/templates/{html-sample1,custom-html}

Add the following to your etc/FaxDispatch and etc/FaxNotify:

TEMPLATE=custom-html
Edit the font-family in the css.inc file to suit your needs.

Once you’ve saved the changes to etc/FaxDispatch and etc/FaxNotify, the new templates will be used the next time you receive and send a fax.

Replace HylaFAX Agent

You can easily replace all occurrences of "HylaFAX Agent" in the email templates with the following command:

sed -i -e 's/HylaFAX Agent/My Fax Service/' /var/spool/hylafax/etc/templates/custom/*.txt

Change From Email

To change the email address that sends the email notifications for sent and received faxes, edit /var/spool/hylafax/etc/FaxDispatch and FaxNotify and set:

FROMADDR=faxserver@example.com
Once you save your changes, they will be applied automatically to the next email notifications.

Disable Success Notifications to FaxMaster

To receive notifications for failed fax transmissions only, set the following in /var/spool/hylafax/etc/FaxDispatch and FaxNotify:

NOTIFY_FAXMASTER=errors

To disable all fax transmission notifications to FaxMaster, use the following instead:

NOTIFY_FAXMASTER=never

Your changes are applied automatically.