Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print to a file then email file

Status
Not open for further replies.

mwend

MIS
Oct 10, 2001
3
US
Running AIX 4.3.3 ML 9
I would like to be able to print to an AIX printer and have it Email my faxserver. My faxserver will then be responsible for faxing the email to the correct designation.
The Email-to-fax is working great. The part I am missing is the Print-to-email part.
Signed into AIX I can:
(root)> mailx -s &quot;subject here&quot; faxme < /myfile
and then the faxserver picks up the email, (from the AIX account as I have POP and SMTP running , whew, thanks to the help found in this forum)
The question I have is how do I define a custom generic text like printer that will email the 'print job' to faxme@. I've tried to define a custom printer with a backend job to &quot;mailx faxme&quot; - but that is obviously not working. I have been able to create a print queue to print to a /dev/myfaxfile text file, so if I can email this file, I'd be all set and I thus need to do it once it has been &quot;printed&quot; to the file.

Any help is appreciated
Mike Wendling
Administrator
(AIX, SSA, NT and Win2000 Servers [shhh])
 
Odd, I created a custom backend that was a script, and it worked.

Here is what I did...

1. Add a print queue called &quot;hosts&quot;
2. Pointed it to a script that does a &quot;cat /etc/hosts|mail root&quot;
3. lp -d hosts /etc/motd

Granted, in this case, the &quot;/etc/motd&quot; is a dummy argument, but I received the E-mail to my notes account in 5-seconds.

Will this help ?

Bill.
 
1. I've &quot;touch /dev/mailptr&quot;
2. I've created a new queue, generic ascii, called mailptr
3. I've created a script called &quot;/mailfile&quot; where mailfile contains
&quot;cat /etc/hosts |bellmail root&quot;
I run this and I do get mail. Obviosly the same file /etc/hosts
4. When I &quot;lp -d mailptr /test.txt&quot; the file /dev/mailptr contains what I 'printed' to file
5. I am missing the details of step #2 from the previous reply.
I've tried to make the BACKEND PROGRAM =[ /mailfile ]
but that doesn't work as it stops the mailptr queue. Details from smit are below

Name of queue device mailptr
Queue to which queue device is attached mailptr
* BACKEND PROGRAM pathname [/usr/lib/lpd/piobe]
BACKEND OUTPUT FILE pathname [/dev/mailptr]
ACCESS MODE of backend output file [both read and write] +
Print HEADER pages? never +
Print TRAILER pages? never +

any other suggestions?

Thank you
Mike Wendling
 
My mail queue was an &quot;other&quot;. I set the &quot;backend&quot; as the name of the script.

Bill.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top