?
Solved

Hylafax Confirmations

Posted on 2004-09-30
10
Medium Priority
?
383 Views
Last Modified: 2010-04-20
Hi, is there any way to configure hylafax or linux redhat 7 itself to either directly or indirectly send the email confirmations to a printer . The confirmations wind up in the users home mail box, but the users are using win 2k pro, and they cannot check that mail box, they only use outlook express which some hardly check, but if the confirms could be directed either to a printer or another fax machine that would work for us. PLEASE HELP.
0
Comment
Question by:jerrycsakanyjr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12190584
On the server create a file called  "/etc/procmailrc".   Ensure that it is readable:  chmod +755 /etc/procmailrc.  Place inside of it:

:0
*   ^From:.your_hylafax_email_address   (whoever is the sender on the email in question)
| /usr/bin/a2ps -P desiredPrinterQueue

Any mail sent to anyone will checked for the hylafax address and if found, the mail will be formatted and delivered.

Ensure that you have the a2ps utility  (it makes things pretty).

You can also use:

| lpr -P deskredPrinterQueue  for a less fancy output.

Barry
0
 
LVL 6

Expert Comment

by:blkline
ID: 12190601
One thing I didn't mention.  If you want this to occur only for certain users then, instead of putting the file into /etc/procmailrc, create it in the user's home directory as:   .procmailrc.


For more information see

man procmail

Barry
0
 

Author Comment

by:jerrycsakanyjr
ID: 12190702
what does the :0 do ?
Where do you configure the hylafax email address ?
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 6

Expert Comment

by:blkline
ID: 12191112
This creates a procmail recipe.  :0 starts the recipe.  

Find the hylafax email address from one of the emails that it sends to your users.  That line is looking for a beginning of a line, followed by "From:." , followed by an e-mail address.  That's how it knows to process that e-mail.

| lpr -P print  

pipes the output through lpr or a2ps, your choice   (I'd do this one as it converts the text based message to post script for printing.

There are many cool things you can do with procmail.  Check:   man procmailex  for examples.

Barry
0
 

Author Comment

by:jerrycsakanyjr
ID: 12191280
we use sendmail though not procmail ...is this a problem ?
0
 
LVL 6

Expert Comment

by:blkline
ID: 12192261
sendmail is your MTA.   Procmail will be called on delivery.  You'll be fine.

BK
0
 

Author Comment

by:jerrycsakanyjr
ID: 12192285
Do i have to restart any services ...
0
 
LVL 6

Expert Comment

by:blkline
ID: 12192355
No.      Just create the file and have at it!   FWIW, I do this exact thing for some reports that we get e-mailed to us from our answering service.  The reports come in on e-mail and are printed at the appropriate printer for retrieval the next morning.
0
 

Author Comment

by:jerrycsakanyjr
ID: 12192419
Hmm.its not working, i'm getting them emails, but they are just not printing for some reason. Could that be because i have a .forward file that forward file in my home directory that forwards emails to a certain address ? I pasted the contents of the procmailrc file below see if there are any typos.


:0
* ^From:.fax@belleabstract.com
| /usr/bin/a2ps -P up-middle
0
 
LVL 6

Accepted Solution

by:
blkline earned 2000 total points
ID: 12192838
The forward would supercede the procmailrc file, I think.  Be sure that you have procmail installed on this machine.  On RH 7 it should be there, but type "which procmail" just to be sure.  Also, type "which a2ps" to ensure that you have that tool, too.  Assuming that you have all of that, you need to see what's up with procmail.

Just for fun, copy that /etc/procmailrc file to the user's home directory.  Thus, if you are delivering mail to george, copy /etc/procmailrc to /home/george/.procmailrc, then chown george.george /home/george/.procmailrc.  

Alternately, set up a test account (say testprint) and create a .procmailrc file in /home/testprint.

Make its contents:

:0  (that a zero)
| /usr/bin/a2ps -P up-middle

Then send it some mail:

mail -s "Testing" testprint
You type here
^D  

And it should print.  That will give you some assurance that the basics are there and we can work on getting the other e-mails printed.

0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question