fax

Deliver with a fax-sending program V8.8 and later

The fax delivery agent is used to deliver mail to a fax-sending program. If you define this delivery agent with:

MAILER(`fax')

any address that ends in .fax is automatically sent to that delivery agent. Thus, to fax mail to a user on the local machine, you might do the following:

To: joe@5554321.fax

This will cause the message to be sent to the faxmail program for delivery to the number 555-4321.[271] The faxmail program will parse the message for a recipient, and for fax-tuning parameters passed in header lines that begin with x-fax-. It will format and send the result to the hfaxd daemon, which actually communicates with fax modems.

Note that hfaxd and the modems need not exist on the local machine. If you have a central fax server, you can set up all the client machines by defining the FAX_RELAY mc configuration macro to point at that machine:

define(`FAX_RELAY', `fax.your.domain')

With this definition, any mail addressed to an address ending in .fax will be forwarded to fax.your.domain for sending as a fax. Obviously, you will need to have fax-sending software and fax modems installed on that machine.

Note that you should use either MAILER(fax) or FAX_RELAY—not both. If you declare both, the MAILER(fax) will supersede the FAX_RELAY, and all fax mail will be delivered locally.

Another way to handle faxes is to set up aliases for each user that can receive faxes:

userA+fax: "|/usr/local/bin/faxmail -d userA@5551234" userB+fax: "|/usr/local/bin/faxmail ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.