Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2001 14:38:34 -0700
From:      dannyman <dannyman@toldme.com>
To:        "Arthur W. Neilson III" <art@pilikia.net>
Cc:        stable@freebsd.org
Subject:   Re: emailing a printer
Message-ID:  <20010612143834.F99558@toldme.com>
In-Reply-To: <200106112129540460.11D1B51F@smtp>; from art@pilikia.net on Mon, Jun 11, 2001 at 09:29:54PM -1000
References:  <200106112129540460.11D1B51F@smtp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 11, 2001 at 09:29:54PM -1000, Arthur W. Neilson III wrote:
> Recently I was asked if FreeBSD could be used as a print server for
> email; i.e. sending email to a networked printer.  The idea is to have
> email addresses for printers and be able to route mail to them for
> delivery on hardcopy.  We have *many* printers and my initial idea
> of using /etc/mail/aliases i.e. helpdesk@boh.com: "| lpr 10.0.0.1"
> for example seems rather cumbersome and difficult to manage when
> you start adding them all up.  Does anyone have recommendations
> for this?

With Postfix, you could set up a transport in master.cf:

lpr  unix    -  n    n       -       -       pipe
        user=nobody argv=/bin/lpr -P $extension

Then, you configure somehow printer to deliver via the lpr transport.
In this example, an e-mail to print+hp@printhost would send the message
to lpr -P hp.

That's the idea.  There is probably a cleaner way to do this, like set
up a virtual host called "printme" and then configure the virtual table
so hp@printme does the deed.

If you don't feel like knowing your MTA so well, write the script.

The ultimate answer would be to maintain printer information in LDAP and
use LDAP map lookups to only deliver to appropriate printers.  I may be
able to furnish detailed information on this kind of stuff later this
year or so. :)

-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010612143834.F99558>