From owner-freebsd-questions Mon Oct 22 12:37: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from yertle.kciLink.com (yertle.kcilink.com [216.194.193.105]) by hub.freebsd.org (Postfix) with ESMTP id 5BF9737B409 for ; Mon, 22 Oct 2001 12:36:57 -0700 (PDT) Received: from onceler.kciLink.com (onceler.kciLink.com [216.194.193.106]) by yertle.kciLink.com (Postfix) with ESMTP id D95692E461 for ; Mon, 22 Oct 2001 15:36:56 -0400 (EDT) Received: (from khera@localhost) by onceler.kciLink.com (8.11.6/8.11.6) id f9MJauk86053; Mon, 22 Oct 2001 15:36:56 -0400 (EDT) (envelope-from khera@kcilink.com) X-Authentication-Warning: onceler.kciLink.com: khera set sender to khera@kcilink.com using -f To: questions@freebsd.org Subject: Re: OT: email->fax gateway References: <000001c15a9f$ac689700$d6444018@zeus> From: Vivek Khera Date: 22 Oct 2001 15:36:56 -0400 In-Reply-To: <000001c15a9f$ac689700$d6444018@zeus> Message-ID: Lines: 56 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >>>>> "MR" == Mike Roest 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