Date: 22 Oct 2001 15:36:56 -0400 From: Vivek Khera <khera@kcilink.com> To: questions@freebsd.org Subject: Re: OT: email->fax gateway Message-ID: <x7u1wrfovb.fsf@onceler.kciLink.com> In-Reply-To: <000001c15a9f$ac689700$d6444018@zeus> References: <000001c15a9f$ac689700$d6444018@zeus>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "MR" == Mike Roest <bsd-lists@blahz.ab.ca> writes:
MR> Anyone ever gotten an email->fax gateway setup under FreeBSD?
Yes. Originally under sendmail, then under postfix. With postfix it
is much easier. Just configure a fake top-level domain, like .fax,
then any message sent to Joe_User@5551212.fax would be delivered by
the "fax" transport agent. The fax transport agent was just a shell
script that took the address, split it into the parts necessary for
hylafax' sendfax program, read the message from stdin and run it
through faxmail to format it nicely, then fax it.
Here's the script. Obviously you need to change the FAXSERVER
setting.
--cut here--
#! /bin/sh
#
# mailfax - Email to FAX gateway for postfix
#
# This file should be installed as /usr/local/libexec/mailfax
# (or whatever is specified in the master.cf file) below.
#
# Edit your Postfix master.cf configuration. Include the following
# mailer definition:
#
# fax unix - n n - 5 pipe
# flags= user=fax argv=/usr/local/libexec/mailfax ${recipient} ${sender}
#
# and add the following to the address transport map:
#
# .fax fax:localhost
#
# Now, email sent to NAME@FAXNUMBER.fax will be sent via the sendfax program.
#
# Note that the mailfax script must be invoked as either root, daemon, or
# uucp if the from address is to be changed with the -f option to sendfax.
#
FAXSERVER=faxmachine; export FAXSERVER
TO=$1
FROM=$2
# strip the .fax part of the address to pass to the sendfax program
TO=`echo $TO | sed -e 's/\.fax$//'`
/usr/contrib/bin/faxmail -n -d "$TO" "$FROM"
--cut here--
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?x7u1wrfovb.fsf>
